09-30-2009 06:27 AM
I made separate class in my application which extends Application (not UiApplicaton), starts in background and waits for global events. Now it works well Thanks!
But not so good. Icon changed only when I set cursor to my icon. Why it is not works same as standard email client (icon changed immediatelly)? Perhaps, I need to update Home screen programmatically, or something yet...?
09-30-2009 06:41 AM
"I made separate class in my application which extends Application "
Good idea. Glad it solved the problem.
"But not so good. Icon changed only when I set cursor to my icon."
Is this a new problem. If so, can I suggest that you mark this as Solved and start a new Thread with this problem.
04-04-2013 02:47 AM - edited 04-04-2013 02:48 AM
1. No need to extend Application (though program allows you to run application inside UiApplication).
2. Make a separate class but only implement with GlobalEventListener.
3. If UiApplication, then whatever you do inside of event occured, do it inside another Runnable and call it inside invokelater. In application do it inside thread, because any operation you maybe doing could be blocking.
This helps return out of EventOccured fast, and you may receive other events quickly.
3. Also keep a try catch watch in this Runnable wrapping task you do in EventOccured function.
This helped me, hope this helps you.