06-23-2011 03:41 AM
I have a midlet 2.0 application (no proprietary RIM api, just plain, compliant, midlet 2.0).
On blackberries (tried with two device, one 5.0 and one 6.0) If I switch from the application to the home screen and than back to the application the application is not responsive.
I use the "pointer of the device" to navigate to selectable elements or can click with touch.
The application is written with the gaming api.
After resume up/down/left/right or touch event are not triggered anymore.
If an element was left selected I can click and the application enter that element returning to work.
On Nokia devices this do not happen indicating there is something different happening in the blackberry.
I extended javax.microedition.lcdui.Canvas to handle keywords / touch events, draw on the screen through javax.microedition.lcdui.Graphics
I have two CustomCanvas in an array and switch between them to change page (so that I can load the new page in background before switching).
Every time a new request is issued, from my midlet class, extending javax.microedition.midlet.MIDlet, I do:
Display display = Display.getDisplay(this);
// do stuff here
At initialization ( startApp() method from javax.microedition.midlet.MIDlet ) if it's the first time I create some instance of custom classing initializing them.
I never again initialize them and do nothing on resumeApp() nor on startApp() if called after a resume.
which kind of event can I get for background / foreground event on a midlet running on a blackberry?
and what should I re-initialize / check to handle these events?
Solved! Go to Solution.
06-23-2011 01:20 PM