On Fri, Oct 22, 2010 at 5:05 PM, klavin <[email protected]> wrote: > If I Force Stop an app (via Settings->Applications->Manage > Applications->Any App->Force Stop) will the app ever start up > automatically again or is the only way to start it up again to have > the user start it. > > I have an app that starts a service. The service registers an alarm > I've defined, with the Alarm Manager and this is recieved as > expected. In my manifest I've defined a TimerIntentReceiver, to > receive that alarm I've defined. If I Force Stop the app then is it > possible to have the Alarm Manager "wake" my app up via the > TimerIntentReceiver I've defined. I'm not seeing this happen. Once I > Force Stop my app it never runs again unless I manually start it.
I have not played with Force Stop and AlarmManager. Certainly, there was an API that task killers used that would get rid of a package's alarms when the task was killed. Perhaps Force Stop is using that (now internal to the OS and not exposed through the SDK). I didn't think that was the case, but, again, I have not experimented with it. You can see if your alarms are still scheduled by running: adb shell dumpsys alarm from your command prompt, terminal, or shell. > Is there anything I can listen for, apart from BOOT_COMPLETE, to start > up my app? Or does the user always have to start all apps. If the user told your app to Force Stop, don't you think it would be a good idea to honor the request? -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.1 Available! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

