I'm working with OTA update for the app. It works like this: I click "check update", it checks it, downloads if exists and save apk on the device. Then I can install it, but of course I have a confirmation dialog. I need to do it silently and restart the app.
I want to make it auto-install when downloading finished. So I just click and if there's some update the app restarts in new version. I can't figure out how to do it. The device is rooted.
The following code works only on roodted devices!