On Sat, May 26, 2012 at 4:50 PM, Jeremy <[email protected]> wrote: > The only problem is that occasionally (e.g. seemingly at random, maybe > once every few days or weeks) I will walk by the display case and > notice that my program is no longer updating the display -- in > particular, my application is no longer running at all; instead, the > device has returned itself to the Android 'desktop'. I can of course > re-start the app easily enough, but that involves unlocking the > display case to press the app icon, which can be inconvenient.
Make your activity be the "desktop" (a.k.a., home screen). > I suspect that Android (in its infinite wisdom) > decided to kill my app in order to free up some memory, but in this > case that's a bad thing to do, since the device is dedicated to > running this app only, which means killing this app defeats the > purpose of the device. That should not happen for the foreground process. I suspect that something else is the root of your difficulty, though I have no idea what. > is > there a way for my code to check periodically (e.g. once a day) to see > if the app was killed, and auto-restart it? Use AlarmManager with a getActivity() PendingIntent. Or, make your activity be the home screen. I haven't tried creating a home screen that crashed, so I presume that Android relaunches a fresh copy, though I do not know for certain. > Either solution would > make the Android-device-as-electric-sign concept much more viable, as > the device needs to "just work" for months at a time without any hand- > holding from a user. Note that this is not exactly a target market for the core Android team. :-) -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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

