Search code examples
androidrootkiosk-mode

Suppress unfortunately app stopped


I'm developing a kiosk type application, running on a rooted device.

One feature of the app is that you must be able to download new versions of the app via wifi. However after running sudo commands to uninstall the app & reinstall the new one, we see the message 'unfortunately app has stopped'.

I'm trying to find a work around. The client does not want this dialog to be shown.

I thought of creating a second application to host on the device in order to display whilst updating and to close again after, but even if the other app is in the background, we would still be able to see the dialog which is against the clients wishes.

Any suggestions?


Solution

  • I doubt that the solution you thought of will work.
    You receive the message saying unfortunately app has stopped because it is getting uninstalled while it is still running either in the background or not it doesn't matter.

    What I would imagine could be a solution is sending out a command to quit the application you could use force-stop for this.

    Take a look at these posts they might help you out

    Stopping an Android app from console
    Force Close an app programmatically