Android PackageInstaller, re-open the app after it updates itself
I'm developing an app that runs as Device Owner, and I want to build an automatic updater inside it. To do it I use the PackageInstaller, as I have the privileges to use it due to my Device owner position. private void installPackage(InputStream inputStream) throws IOException { notifyLog("Inizio aggiornamento..."); PackageInstaller packageInstaller = context.getPackageManager().getPackageInstaller(); int sessionId = packageInstaller.createSession(new PackageInstaller .SessionParams(PackageInstaller.SessionParams.MODE_FULL_INSTALL)); PackageInstaller.Session session = packageInstaller