Well this is easy. Write some logic in your app in the main[] method that
checks the state read from the the storage card. If the app was previously
running, then continue to execute your app otherwise terminate. Do what Peter
suggested so this will be true even on a soft reset.
There are some other issues you may not of considered. If you hard reset
your device (not soft reset), you will have to reinstall your application as
eveything in RAM will be lost. You can achieve this by writing an autorun
application. Search for Autorun in the archives for more info.
Simon.
Thanks for the responses, Peter.
I think the way that you suggested would make my application run
every time the device boots. But what exactly i need is this. I'm
running my app. For some reason i hard reset my device without closing
the app. In that case, the app should store its state some where( on
a SD card probably. I'm even bothered about this. I should check if
the card exists and store the state information in it). Once the
device boots up my app should run automatically. So the app should not
run if it was not already running when the device is hard reset. How
do i acheive this. Please...... suggest!