| | Hi, Blackberry JDE provides an option for making your application Auto-run on start
Please Login to Remove!
Blackberry JDE provides an option for making your application Auto-run on startup. But surprisingly these applications will auto-run only after hard reset (Alt + cap + Del or battery pull-up).
But for a user perspective the application will restart on Soft reset too (turn off and turn on by pressing power button).
I have faced lot of issues for making a CLDC application auto-run in all the above cases and make the auto-run option is user defined.
Now I have successfully implemented this and tested with OS versions 4.0.2 to 4.6.
I have made a monitor application with my Main application to do the Soft reset activity.
The monitor application is a CLDC application which extends the Application class and implements the SystemListener (for monitoring the powerUp() after reset) and GlobalEvent Listener (for closing the monitor application).
Upon exiting from my main application I will check for Auto-run option enabled and if yes I will start the monitor application before exiting from mainApp. The monitor application will monitor the powerUp() status after reset and will start the MainApplication.
Main application will close the monitor application by posting a globalevent to monitor application.
The monitor application is a system module. So there is no ICON for it and we can add the .cod file of the application as a dependent module with our main application. The size of the monitor application is also very less (2k).
This approach may help someone wants to make their CLDC application auto-run in all the scenarios.