Hi all, First, a little bit of background info: I wrote a very simple Android app, which is intended to run alone on a dedicated device. The app's purpose is simply to display (and occasionally update) a specified web page, indefinitely. The app wakes up the device once every four hours (via AlarmManager) to re-download the web page and update the display, and the device spends the rest of its time asleep to maximize battery life. The device is typically one with an e-ink display (e.g. a Nook Simple Touch) so that the web page can be displayed constantly without draining power (even when the device is asleep).
The program generally runs great -- I can start up the app, place the device into a locked display case, and can forget about it for about 6 weeks (when the batteries next need a recharge). 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. I looked at the device's Android log (via "adb logcat") several times after this happened and didn't see any incriminating error messages, and I also added debug-logging output to my app to see if it was voluntarily exiting for some reason, and didn't see any evidence of that -- in both cases it appears to have been simply disintegrated with no evidence why. 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. Given all of the above, my question is: is there any reasonable way to prevent Android from occasionally killing my app? Or if not, 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? 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. Just for reference, here is the app's web page: https://play.google.com/store/apps/details?id=com.sugoi.electricsign&feature=search_result#?t=W251bGwsMSwxLDEsImNvbS5zdWdvaS5lbGVjdHJpY3NpZ24iXQ.. ... and here is the source code (it's all open-source): https://github.com/jfriesne/Electric-Sign Thanks for any insight or help you can provide, Jeremy -- 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

