Java/Android and using loops - Windows Mobile Software Development

Hi Everyone,
Using the SkeletonApp default code, how would I insert a void or whatever (sorry not knowing the terminology yet) that would run each cycle of the program like a counter or something?
Just keep it simple, just a "run this always" loop while maintaining the button functions would be great.
OR-
I did read something on the web that said Java/Android does not use a main run void() like C#,C++ and others do, but in fact it uses more than one function/class or something as it's loop.
Is that true?
EDIT: why is this in the windows forum, I posted in the Android...since a mod missed it I will re-post in Android.

Related

Software Suggestion

Hey developers,
I have got a ral challanging project for you.
Idea is, we have to create a login software for windows mobile 6. Phone must ask you password while unlocking from standby mode. Here, there is a twist.
Usually, there is only one user and only one password. But, this software must provide multiple user login support.
Let me explain:
For exmaple, say, 'QWERTY' is the default password. Now, if user enters using this password, he should be provided with full access of the device (as usual.) But, if secondary password, say, 'ASDFGH' is entered, he should be provided limited access to the device. Default password user should have menu to specify which features secondary user is allowed to use. Like, when secondary password is used, keep some specified files hidden, limited programs avilable etc.
Primary objective of this software is to keep some contents hidden from secondary user, which will be available for primary ,i.e., default user. Though, WinMo is the thing made for personal use, everybody will agree that, it, sometimes, falls in wrong hands and pulls owner in embrassing situations. (For example, imagine your partner getting known to all your secreats by viewing your Pocket PC and you can't restrict him/her from doing so.)
I hope, anybody will come up with correct thing.
Thank you.
i got clear of what you wanted, but dunno what your question is...
are you gonna create some application from scratch, or just stuck by some specific issue? or sth else is your query?
nicholas_yin said:
i got clear of what you wanted, but dunno what your question is...
are you gonna create some application from scratch, or just stuck by some specific issue? or sth else is your query?
Click to expand...
Click to collapse
I want the application to be created by some developer as I am not that good at developing. (though I am a good beta taster!) I want this so that we can tell secondary password to other people so that our data remains safe and simultaneously we are rescued from making statement-"I'm sorry, but I can't tell you password!"
Idea is good, but you have to take initiative steps first...
Edited the poll: changed the title: "how many times" to "With who" since that makes more sense in respect to the options.
Added "with no-one" to complete the poll.
Regards,
EqX
drnajmu said:
Idea is good, but you have to take initiative steps first...
Click to expand...
Click to collapse
Well, as I told, I wish somebody else to do it. I'm not good at developing.
the-equinoxe said:
Edited the poll: changed the title: "how many times" to "With who" since that makes more sense in respect to the options.
Added "with no-one" to complete the poll.
Regards,
EqX
Click to expand...
Click to collapse
Yes! You're right. Thanks for improving the poll. Think about my suggestion. Can anybody take up the project?

MortScript and asynchronous behavior.

Hi,
I am completely new to MortScript, but I am really impressed with the wide variety of functions available..
I have however an obstacle regarding user-prompting with a windows, message etc..
I would basically like to trigger an application in the background (with RunWait) and then prompt the user with a statuswindow...
So basically I would need a window to inform the user, that something is being processed and the device should be left untouched. And while that window is active my application is running in the background, and the script continues after the application has closed (runwait).
Is this somehow possible with MortScript. I might be blind, but it's five in the morning and all I can see are messages that somehow needs user validation by pressing "ok" og has a counter.. (i.e. message, bigmessage, sleepmessage).
Hope someone can help
i could answer your question.
but then we would have 2 threads going.
best to post your question here
http://forum.xda-developers.com/showthread.php?t=289197&page=284
Allright, I was wondering if I should have posted in that thread. Thought it was strictly for examplescripts..
But I just scrolled a little further down in the documentation, and saw the statuswindow... ahem, yup I was very tired when I looked at it

the key to hacking the KIN

the key to hacking this phone, as ive noticed, isnt getting a new os. ive paid attention and i think i know what to do. we need a new internet browser. if you think about it, the browser is the problem because of its zero functionality. what we need to do is make an html parser in java that is invoked in javascript (dezgrz thx for finding out about the javascript apps). i think we should focus on getting this done.
Its a good idea but we have no way of uploading a new browser to the device.
X-15D9W8491 said:
the key to hacking this phone, as ive noticed, isnt getting a new os. ive paid attention and i think i know what to do. we need a new internet browser. if you think about it, the browser is the problem because of its zero functionality. what we need to do is make an html parser in java that is invoked in javascript (dezgrz thx for finding out about the javascript apps). i think we should focus on getting this done.
Click to expand...
Click to collapse
Your post makes no sense.
First because that's not the key for hacking
Second cause java applications can't be invoked from javascript.
it does make sense @johnkussack
is does make sense. you can invoke a java app through js. quit criticizing me just because you dont know what youre talking about. and besides, what i meant to say (if this makes it easier to understand) is that we code a java app onto the phone that automatically connects to the browser and a download is set off in javascript that bypasses anything written into the browser by editing the permissions, etc by editing the browser and just making a new one and not being lazy. you of all people should know this makes sense because you programmed and app onto the kin! besides, the whole thing about hacking is to be optimistic or you never get it done and youre impeding development with stupid posts like your last. get a grip and post something important instead of that trash next time!
thats the point
WEM97 said:
Its a good idea but we have no way of uploading a new browser to the device.
Click to expand...
Click to collapse
exactly my point. we could just create a new app like john did only we make it work like john obviously failed to do.
X-15D9W8491 said:
exactly my point. we could just create a new app like john did only we make it work like john obviously failed to do.
Click to expand...
Click to collapse
~~~~~~~~~~~~~~Forgotten~~~~~~~~~~~~
X-15D9W8491 said:
nonsense stuff
Click to expand...
Click to collapse
First of all, you'r messing it all
Second, to run a java application you would need to have a java virtual machine (which kin has not), or interpretation for java applets (which kin has not).
Third, i do know what i talk about, cause i code in Java & Javascript.
X-15D9W8491 said:
is that we code a java app onto the phone that automatically connects to the browser and a download is set off in javascript that bypasses anything written into the browser by editing the permissions, etc by editing the browser and just making a new one and not being lazy.
Click to expand...
Click to collapse
Here one could stop reading. Also you can call Kitt to try to hack it, but it may not answer.
So, do your work before saying that other have failed where you have no success either.
And if we could do that magic stuff, last thing we should do is care about a new browser, when you could just install opera for win ce. So all the topic is going nowhere.
johnkussack said:
First of all, you'r messing it all
Second, to run a java application you would need to have a java virtual machine (which kin has not), or interpretation for java applets (which kin has not).
Third, i do know what i talk about, cause i code in Java & Javascript.
Here one could stop reading. Also you can call Kitt to try to hack it, but it may not answer.
So, do your work before saying that other have failed where you have no success either.
And if we could do that magic stuff, last thing we should do is care about a new browser, when you could just install opera for win ce. So all the topic is going nowhere.
Click to expand...
Click to collapse
first, i havent had any success yet because those were plans. i havent tried this yet.
second, if putting on opera could help, why didnt you do it, "genius"?
if this thread is going nowhere then do me a favor and stop posting on it!
piss off
soninja8 said:
You sound like a smart-ass. You think its so simple that you decide to make fun of John. Without John we wouldnt have done anything by now so you should just shut it.
Click to expand...
Click to collapse
that post was an a and b conversation between me and john so c your way out, dumbass. and you should shut it because you havent really helped at all, john has gotten me nowhere because i started from the beginning before i was part of this, and i need absolutely no input from you.
X-15D9W8491 said:
second, if putting on opera could help, why didnt you do it, "genius"?
Click to expand...
Click to collapse
because we don't know how to do that yet.
I don't own this device, but a friend does. What happens if you download an exe or cab from the browser?
xboxfanj said:
I don't own this device, but a friend does. What happens if you download an exe or cab from the browser?
Click to expand...
Click to collapse
It tells you the file type is not supported. Basically, you can't download something to the Kin that it isn't designed to handle.
X-15D9W8491 said:
that post was an a and b conversation between me and john so c your way out, dumbass. and you should shut it because you havent really helped at all, john has gotten me nowhere because i started from the beginning before i was part of this, and i need absolutely no input from you.
Click to expand...
Click to collapse
~~~~~Forgotten~~~~~
I am not taking sides here but you guys both have points. X has a really good idea though so at least try. show proof it dosent work then i will agree with you. Its a good idea but we dont have the means of getting into the KIN.
there comes a time
Code:
the key to hacking this phone,[COLOR="Silver"][SIZE="1"] as ive noticed,[/SIZE][/COLOR] isnt getting a new os.
This is a solid point. We should not examine the possibilities of a new operating system until we are able to work with the current one.
Code:
[COLOR="Silver"][SIZE="1"] ive paid attention and i think i know what to do.[/SIZE][/COLOR] we need a new internet [B]browser.[/B] if you think about it, the browser is the problem because of its zero functionality.
Maybe so. Though the current OS has many shortcommings of, you could definitely argue that none are as confining as the browser
Code:
what we need to do is make an html parser in java
I am not sure what you mean by this. My initial impression is that coding an HTML parser from the ground up in Java is far out of the scope of this project. Perhaps you will explain it's purpose in a later part of your post.
Code:
that is invoked in javascript (dezgrz thx for finding out about the javascript apps).
I guess what you mean by this is to use the current browser's javascript interpreter to invoke the HTML parser. There are a few severe hurdles you'd have to overcome to do this.
First of all and from what I understand, the Kin's built-in browser is IE 6 for Mobile. Web developers and users alike agree that IE6, regrardless of it's environment is a very broken web browser. Despite this, it is still a full-featured web browser, at least by Microsoft's standards. So for the purpose of security, Microsoft has probably constructed the browser in such a way that code run in it will be heavily isolated from the rest of the OS. I know that exploits for IE6 are a dime a dozen but even most of those require more access to the device than we have. Our situation is compounded by the fact that, even as far as other mobile versions of IE6 go, the Kin's browser is badly crippled.
Second of all, assuming you could somehow invoke the Java code through JS, the Java code would still have to be interpreted and run using a Java interpreter which the phone lacks. Java is an interpreted language. What that means is that in the most basic sense, a Java application is comprised of a bunch of text files containing programmer code. When you 'run' a java application, what you are really doing is running a special program (called a Java INTERPRETER, what we've been talking about) that takes that programmer code and turns it into computer code that is capable of being executed. The interpreter is the part that the Kin lacks. Without it, the text files of programmer code that are the java application just look like ordinary text files to the Kin.
Code:
[COLOR="Silver"][SIZE="1"]i think we should focus on getting this done.[/SIZE][/COLOR]
...and unfortunately we've come to the end of the post. I have only talked about some of the preliminary issues with your project roadmap but IMHO they'd be pretty fatal to it's success.
Let me know if you'd like me to explain anything else to you. In the meanwhile, let's wait and see what more directed people like JK come up with.
Oh thank goodness, another post. Perhaps this one will explain some of the discontinuities that arose in the first post.
Code:
[COLOR="Silver"][SIZE="1"]is does make sense.[/SIZE][/COLOR] you can invoke a java app through js.
I am not aware of any way to do so, especially on as crippled a browser as the kin one. I've already kind of addressed this in the previous post albeit indirectly.
Code:
[COLOR="Silver"][SIZE="1"]quit criticizing me just because you dont know what youre talking about. and besides, what i meant to say (if this makes it easier to understand) is that[/SIZE][/COLOR]
I've decided to minify all the psychosocial turmoil content in his posts in order to make what I am referring to more clear.
Code:
we code a java app onto the phone that automatically connects to the browser
This portion confused me for a bit as in the first post you talked about a Java HTML parser howerver now it seems to have changed to something that simply interfaces the current browser. Maybe this would be more within the scope of the project but you'd still have to get through all the aforementioned hurdles. Even so I'm not really sure what purpose it would serve.
Code:
and a download is set off in javascript that
Oh ok, here you are explaining how the Java code gets to the browser. You use javascript injection to make the browser download the Java application.
Code:
bypasses anything written into the browser
Now, this would be a real trick. Accomplishing this would be equivalent to acquiring a U-Boat by fishing in the toilet.
Code:
by editing the permissions, etc by editing the browser
Another primary problem about your train of thought is that you seemingly assume that javascript is capable of doing debug-level computing tasks such as significantly modifying a compiled binary and perform priveleged filesystem operations. Stuff like this would be a pain in the neck to do even on a desktop computer with suited programming languages.
Code:
and just making a new one [COLOR="Silver"][SIZE="1"]and not being lazy. [/SIZE][/COLOR]
Javascript is a language designed for the web, not general purpose and certainly not for creating another web browser from scratch. JS, like Java is an interpreted language except the interpreter is included in the web browser. I am not sure coding a web browser within a web browser would produce very desireable results, esp. with such limited processing power as is available on Kin hardware.
Code:
[COLOR="Silver"][SIZE="1"]you of all people should know this makes sense because [/SIZE][/COLOR]you programmed and app onto the kin![COLOR="Silver"][SIZE="1"] besides, the whole thing about hacking is to be optimistic or you never get it done and youre impeding development with stupid posts like your last. get a grip and post something important instead of that trash next time![/SIZE][/COLOR]
hm. hm.
In conclusion, have a nice day.
In fact,iirc the Kin doesnt even have Javascript but JScript. Microsoft implementation, compatible with javascript itself.
http://en.wikipedia.org/wiki/JScript
The funny commands which could expose part of the system doesnt work, of course.
That's just weird
johnkussack said:
In fact,iirc the Kin doesnt even have Javascript but JScript. Microsoft implementation, compatible with javascript itself.
http://en.wikipedia.org/wiki/JScript
The funny commands which could expose part of the system doesnt work, of course.
Click to expand...
Click to collapse
ok. first, let's forget our arguments and move on, those have nothing to do with what we are trying to accomplish. Second, how related is jscript to javascript because microsoft always has to make weird implementations of porgramming languages. This could possibly be a minor setback. Third, i'll admit that some things I posted didn't make sense, so i'll make them more understandable in the future.

What is the best method of replacing a button with an image [VB.Net CF]

What the title says really. Seeing as .Net CF doesn't support the VB's BackgroundImage button property i'm looking for an alternative method. I've had a quick read of this page but it makes it seem really complicated to do and i was hoping that you guys would be able to suggest something a bit simpler.
Let me know if you have any ideas.
Hi M3PH,
Have a look at post #3 in this thread
http://forum.xda-developers.com/showthread.php?t=499621
It is from a couple of years ago, regarding a query of how to improve buttons, but not much has changed. The code is in C# but as it only dealing with events, there is very little difference from the equivalent VB code. Any problems let me know. As the post mentions, it is not perfect but it does not look too bad. Click on the button and it switches to its 'button depressed' image.
To try it out, extract the TestDevApp.exe from the zip file and run it in a WinMo 6.0 or later emulator image.
stephj.
One question, Does that method allow for the button to be effectively "skinned"? For example, if Swiss420 was to send me some images for several different buttons could i create a different image list for each button?
Sorry if that question seems stupid. got a teeny tiny hangover and the brain aint working right yet. Anyway thanks and let me know what you think.
Yes, it should work, but how you decide to implement it is up to you.
Either:
1.) Have a separate imagelist for each button, or
2.) Load all the images into one globally accessed imagelist and refer to that from wherever you need it. Just make sure the event for each 'button' uses the correct imagelist index. If you add or delete an image from the 'middle' of the list, you will have to refactor all the code that refers to images with an index greater than the one you have added/deleted.
Good luck!
Cool thanks. I think i'm gonna go for option one coz it seems like less of a pita.
Thanks for all the help

Ideas Thread

I decided it might be a good idea to have a thread to post ideas because the "What we have tried and where to go from here" thread is very over crowded with questions.
Post any ideas you have below and WHY it might work.
Sent from my NookColor using xda premium
* Make a web interface for accesing the Kin
Might work if the right guy makes libraries compatible with windows(i asked already).
If they do, or i'm able to do, i will keep going with it, so it's available for anyone with few steps for configuring (and extend). Btw, it's done on javascript & html so i guess people with only that knowledge could change the skin or behaviour if wanted.
* Make a web interface for the kin (so "webapp"?)
Don't see the point, but some say it's a great stuff. Might work if you care about making it. In the end is just take all with a css for the kin screen.
* Dump the movinand chip using (e)MMC protocol with right pin-outs
Might work as someone here already did for samsung smartphones (with movinand) using UART (so serial cable like). I tested and our SBL (LS+POW mode) doesn't answer OK or in a right way through USB to the MMC command protocol so... i guess that's not the way.
1. Make a web OS for the KIN's browser.
This would allow us to make a web based software that would be better than the KIN, but this wouldnt get us anywhere in hacking the KIN.
2. Create a web apps market.
Might be useful for anyone who wants an app store, this would be close. I like the idea of it. =)
I am gonna try this http://windowsphonehacker.com/mobil...terop_unlocked_only_lucky_need_apply-04-14-12
When someone reminds me how to sr phone as qualcomm.
Sent from my SCH-I510 using XDA

Categories

Resources