1

I'm currently developing an kiosk application on a rooted Android device (MK809III from Ugoos).

My target is to start an activity with just a WebView fullscreen mode which loads a specific URL.

But I'mm facing an unknown behavior that every two hours onStart and onResume are called and I can't determine why.

It is designed as LauncherApplication which ensures that the application is not killed by system processes due to inactivity (hopefully).

Sadly I don't have any reasonable Logs right now that i can hand out. I will try to reproduce this behavior and edit the Logcat output later on.

My (first) concrete Question is:

Is this a normal Android behavior to start an Launcher Application several times without user Interaction ?

CJBS
  • 15,147
  • 6
  • 86
  • 135
tgraf
  • 11
  • 1

1 Answers1

1

Since a Launcher is a still an ordinary Activity, it can be killed like any other Activity when it is in the background and the Android system needs to free memory.

You can force the Launcher to stay in memory by adding the line ro.HOME_APP_ADJ=1 to the file /data/local.prop as superuser (create it, if it isn't there). See http://www.droidhype.com/2010/09/19/force-your-launcher-to-stay-in-memory/ (there are many other posts like this).

BTW, Android L will provide Task Locking for this use case, see Kiosk mode in Android

Community
  • 1
  • 1
  • The Memory stuff is a nice tip, but im not sure if im understand you correctly. You say that my App is killed because of Memory purpose ? and restartet afterwhise ? (because its the homescreen) My Logs are just show onStart() and onResume() entrys no onPause() or onStop() (what appear when im leaving the homescreen and open Options or another app) – tgraf Aug 07 '14 at 14:35