0

We have an app that we want to distribute in-house using the google play private channel. We want to be able to roll out automatic updates but the catch is our software is designed as a home screen.. so it is running 24/7

We have tried it and it seems like Google Play kicks the home screen when it automatically updates it. That is, it closes it and removes the setting for "always" when you click the home button.

Is there something we are doing wrong, or a better way to do this? We are planning to lease these devices and we can't have our customers playing with it as an android device.

MPelletier
  • 16,256
  • 15
  • 86
  • 137
Le-roy Staines
  • 2,037
  • 2
  • 22
  • 40

2 Answers2

0

Yes the OS removes the launcher as the default launcher when it gets updated. This happens to all launchers

tyczj
  • 71,600
  • 54
  • 194
  • 296
0

When a receiver is registered or updated, Android resets any defaults for that receiver automatically. This shouldn't be circumvented, as it's intended as a security process. However, you could install your own version of the OS, and sign your app with the same key - then you would be able to pro grammatically set a default without the user's involvement.

Tim C
  • 635
  • 5
  • 18
  • Attempting to do what you're after is hard - I've had a client ask for the same thing. Also, a word of warning: if your app is the Home screen after a reboot - and it crashes - there is no way out. The original Home screen isn't loaded, and your app will just reload and recrash. You'll need to hook the device up to an ADB and reinstall a version with the bug fixed or one that doesn't load as a Home screen. There is no other way to exit your app. I found that out the hard way. :) – Tim C May 01 '13 at 01:57
  • In the end, I chose not to go the Home screen route. I locked off the buttons as best I could, and hid the bar. There's still ways out, but you have to look for them. In our case, the users won't have the device in-hand long enough for most folks to find a way out. – Tim C May 01 '13 at 01:58
  • What about rebooting the device? Will it still crash? Do you mean a random crash or a reproducible crash that will always happen. We have also blocked off the buttons and set it as the launcher already but the problem is the automatic updates removing it as the default launcher... if only this didn't happen then we would be fine! – Le-roy Staines May 01 '13 at 02:10
  • If the crash happens when your app runs, and the app is set as the default home screen, rebooting the device will automatically launch the default home screen, which would be your app which would crash. Rebooting will just restart the process, as would restarting the app. The only way out is to exit the app - which loads the default home screen - which reloads your app. :( – Tim C May 03 '13 at 16:12
  • So what you mean is it saves the application state when restarting the device? I would have thought it loaded a new instance of the application? – Le-roy Staines May 14 '13 at 06:10
  • No, it doesn't persist the application state. Normally, a failed app goes: App loads -> App crashes -> App exits to Home. The chain ends when the app does, and you are then able to take other actions. With a crash in a home-screen app, you get: App loads -> App crashes -> App exits to Home -> App loads -> infinite circle. There is no opportunity to take other actions, as you can NOT exit the app, as exiting the app returns you to the Home, which IS the app, which reloads. The point I guess is just be careful when replacing the default Home screen. Proceed with caution! – Tim C May 14 '13 at 16:59