Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.

New Developer
Posts: 2
Registered: ‎12-24-2008
My Device: Not Specified

How to auto-start the MIDlet after complete battery discharge?




Can MIDlet be auto-started even aftercomplete recharge of the battery if "auto invocation" was alreadyapproved before complete discharge of the battery and if yes, how?


Here is the scenario. I have developed a MIDlet using Netbeans and JDE 4.1.0. I was able toauto-start the MIDlet after adding to the Manifest and JAD files RIM-MIDlet-Flags-1:1 and approving "auto invocation" after answering"yes" to the prompt "The application <MIDlet name> hasattempted to register itself for auto invocation. Would you like to allowthis".


However it seems that the MIDlet auto-starts only if the batterywas not completely drained.


For example:

If I remove the battery and put it back then the MIDlet is not auto-started. If I start MIDlet manually and attempt to close it then the platform again displays the message to allow "auto invocation", despite that I confirmed it already before.







Posts: 5,339
Registered: ‎09-20-2008
My Device: ***
My Carrier: ***

Re: How to auto-start the MIDlet after complete battery discharge?

Auto-start feature works in different way.


It does not depend on battery charge level.


If your device can start, and device OS is loading, all of autostart applications will run in its turn.


Sooner or later (depends on run-level, set on jde project settings) - your application will run on startup if it is set as an "startup application".


To make sure that there are problems/or there is all right - use EventLogger class.


Write to device event log when your application starts.


To view event log press Alt on device keyboard, hold it and press LGLG


Device log will be opened, inspect it and find out what you need.