11-14-2008 02:12 PM
Hello all ,
I was wondering :
If i want to ensure that only one instance of my application is operating - should i use Singleton Pattern or does the operating system of BB takes care of that ?
If i start it in the emulator once , will it be uploaded every time i will re-compile and re-run it? (i mean thefirst run)
My App is a PhoneListener App with some gui , nothing fancy .
Solved! Go to Solution.
11-16-2008 11:05 AM
Not sure I understand the question.
When you run the emulator, your app is either started during the boot process (if you have set the autostart option in your project), or it is not. Every restart of the simulator is basically the same as booting the device.
If you do not have the autostart property set, then your application will be started when you click on the icon. If you exit the application and the click on the icon again, your application is restarted.
You can keep your application running in background of you override the close() method in your top-level screen and perform a "requestbackground()". Then your application is reentered through the "activate()" method rather than being restarted.
All of this is covered faily well in the RIM Software Development guide and in the sample applications shipped with the JDE.