packageinstaller

Android PackageInstaller, re-open the app after it updates itself

感情迁移 提交于 2019-11-30 19:47:52
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

PackageInstaller \"Silent install and uninstall of apps by Device Owner” - Android M Preview

谁说胖子不能爱 提交于 2019-11-28 19:28:50
PackageInstaller ( https://developer.android.com/reference/android/content/pm/PackageInstaller.html ) seems to have been added starting in API 21 (Lollipop), however I have not found any solid code examples on how to install an APK via this API. Any code help would be appreciated. I’m investigating COSU/Kiosk apps for Android M Preview and was trying to implement the new feature "Silent install and uninstall of apps by Device Owner” ( https://developer.android.com/preview/api-overview.html#afw ) via the PackageInstaller API. Found these, but not helpful: How to install/update/remove APK using

PackageInstaller "Silent install and uninstall of apps by Device Owner” - Android M Preview

耗尽温柔 提交于 2019-11-27 01:20:15
问题 PackageInstaller (https://developer.android.com/reference/android/content/pm/PackageInstaller.html) seems to have been added starting in API 21 (Lollipop), however I have not found any solid code examples on how to install an APK via this API. Any code help would be appreciated. I’m investigating COSU/Kiosk apps for Android M Preview and was trying to implement the new feature "Silent install and uninstall of apps by Device Owner” (https://developer.android.com/preview/api-overview.html#afw)