I have a dumb question. Suppose an application is moved to the active state from the stopped state (this is related to having an app startup after BOOT_COMPLETED and moving the app out of the stopped state). But then the device is shutdown and there is a battery pull. When the device is restarted will the apps that were in the active state still be in that state? My guess is they will not but I want to confirm this (i.e. states are not saved).
Would the situation be any different if there were a battery pull without a shutdown - agreed, not a good situation.
The use case I am looking at is if a battery pull is required to move the system from a lockup condition - not specifically the Android device, but it may be on the same battery feed.
I looked through the ACTION_BATTERY... intents but did not get any insight with regards to this question. Thanks in advance.
The application state will never be saved upon a Restart. To persist data you will have to save them to either a database or somehow else.