11-15-2009 01:01 PM
I have a phonelistener class that works with settings Autostart" and "system". Now I want to start and stop it from my application. I am communicating with it via GlobalEvents so I guess I can use that to stop it. But how do I start from my application and what attributes should it have (like autostart, system,?)
Solved! Go to Solution.
11-15-2009 04:45 PM
Are referring to two applications? One is your GlobalEventListener and the other one is application which uses the first one? If yes, just set your GlobalEventListener app to run on startup. Then from there you can post a global event to start/stop it.
Just a question though, why would you like to do that when you can start and stop the listener without going through the GlobalEventListener?
11-15-2009 05:46 PM
Hi johnbibs. thanks for answering
It is a bit of peculiar setup. I need to be able to control the behavior of the phonelistener, including stopping and starting it from an existing application. The phonelistener not only listens, it will perform certain actions by receiving commands via GlobalEvents from my application. I cannot implement the phonelistener in my app, it has to be a separate module. So, yes in a sense it is 2 separate applications hence the global event communication. I only want the phonelistener to run when my application is running. So I start my application and it in turn should start the phonelistener. I have the technique for communication and the services the phonelistener should do in place.
For your information what is described above as "my application" is really just an interface module between an existing MIDLET from a different platform. That is not really relevant for the problem I have it just to explain why I have to use such a setup.
11-16-2009 02:53 AM
you can start another app, in this case your background app, using applicationmanager. ending it would be done with your global event.