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?