Have you ever used public void uninstall (String packageName, IntentSender statusReceiver)' of
PackageInstaller` ? This is new API added in apilevel 21.
And this API description is
Uninstall the given package, removing it completely from the device. This method is only available to the current "installer of record" for the package.
what does 'installer of record' mean here??
Following the PackageInstaller code shows that the uninstall()
session is bound to a PackageInstaller.Session
which only works from the same installerPackageName
.
So you can only uninstall an app installed from the same installer, e.g. a market application (which is what they seem to mean with 'installer of record').
(Can't comment, yet so I wrote this into a new answer).