Is it possible to force an Android+ package to wait until a program is not running before installing?

Is it possible to force an Android+ package to wait until a program is not running before installing?

I have an internally programmed application that has a database that it uploads.  I want to wait until the program is not running on the phone before the package pushes out because it removes that application first so that, if there are database changes, it recreates the database.  This means that we can't have the program push out while a user is using the program.

 

If it's not possible to wait until the process is no longer running before pushing out, is it possible to wait until the device is charging?

2 Answers

Order By:   Standard | Newest | Votes
Matt Dermody | posted this 01 November 2018

We've had similar threads on this very topic before!

https://discussions.soti.net/thread/install-android-apk-when-previous-version-not-in-use/

https://discussions.soti.net/thread/deferred-profile-assignment/

Unfortunately we don't have a great native solution available. I did recently think of a solution however that involves the following components that might be a suitable workaround. (assuming Android+)

- Use the SOTI Lockdown Utility

- Add a script to the SOTI Lockdown Utility, configured to run on launch/startup

- Configure that script to always install an APK in a given location (/sdcard/yourapp.apk)

- Distribute your updated app APK as just a file instead of an APK install to that location, maintaining the same apk name so that the script will always work(/sdcard/yourapp.apk)

 

The end result is a solution that would distribute the APK to the device but wouldn't install it until the device was rebooted (manual or scripted) which would guarantee that the app wasn't necessarily in use. The draw back is that the app would be re-installed every time that the device is rebooted. 

 

Ultimately I'd want a "Package Name Not In Foreground" option as one of the Profile Application criteria. 

  • 1
  • 1
darkstar107 | posted this 02 November 2018

That's a great idea.  The other thing I noticed is that you can set it to install when the battery is at a minimum level that you specify.  The phones are docked when not in use, so I can set the minimum battery to 100%; if the phone is at 100% i know the phone isn't in use.

 

I like the idea of rebooting to install though so will think about how I want to do this.  Thanks for the reply!

  • 1
  • 0

Give us your feedback
Give us your feedback
Feedback