Configure Autostart at runtime?
is it possible to configure autostart at runtime?
At present Using JDE I am able to Autostart my application.. I want to give the user an option for autostart, with which he can make it true or false.. is it possible to do like this? |
have your autostart part check a persistant value
|
Sorry..I didnt get what you mean?
|
your autostart part reads a persistant store. in the store you save a Boolean with the values autostart (true) or no autostart (false). if the value is set to false the autostart part terminates.
in the settings the user can save the persistant value. |
I have a field called Autostart (0/1);
In My application by default Autostart will be true (Through JDE settings) But when I change and save the autostart field , The autostart flag of the application should change or reset.. And as you said the value of the autostart field will be stored in Persistence store.... |
Help?
|
here is a simple construction using alternate entry points
Code:
if (args.length > 0 && "autostartup".equals(args[0])) { |
Quote:
Is it possible to start an application automatically each time the mobile is swithced On? And i want to start the app automatically after Installation finished.. How to do both? |
:? Can something similar be done to integrate MIDlet and CLDC application...?
Say something like invoking CLDC application from a MIDlet? ??? |
Ok.. simon.hain
Actually I am loading the persistent store value while loading the main screen So I have to load it in the beginning and before calling the main screen I have to do this check.. right? |
to answer the thread hijackers:
autostart midlet autostart with JDE yes, you should check the value before you call the constructor of your application |
Thanks simon ....
|
I tried this method...
But the problem is I always get args.length as 0. But auto start is happening. Is there any problem in handling the arguments in main method? Code:
|
did you create the autorun project as an Alternate CLDC Application Entry Point?
did you put autostartup into the 'arguments passed to...' field in the project properties? did you at least read the link i posted? |
I went through the link, but I didn't get properly.
I have MyApplication and MyAppAEP MyAppAEP is the Alternate Entry point App. in that I specified my application name and variable as "autostartup". But MyAppAEP is just a project without any files.. is there any mistake here? |
Hi simon,
I was doing the same which you suggested... But there was a misunderstanding. I thought this AEP will execute when the Application starts automatically... But it gets executed when we invoke by clicking the icon.... Anyway its working fine now.... Thanks a lot for your support... :smile: |
Now The problem is I am getting two Application icon While switching the application.....
|
your AEP application does not need an icon, you have to mark it as system module/autorun at startup. it calls the main method of your application.
|
2 Attachment(s)
Still I am getting two icons. When I didnt give an icon for AEP it comes with a default black icon.
At startup the AEP will get executed. Whenever the user invoke the app with icone, it will invoke the main application. My problem is two different instances are existing at the same time. I have attached the properties settings along with this post. is there any way by which we can make sure that only one instance will exist at a time? Attachment 11958 Attachment 11959 |
All times are GMT -5. The time now is 01:03 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.