PackageInstallerSelfUpgrade Method |
Namespace: Com.Datalogic.Device.App
Exception | Condition |
---|---|
PackageInstallerException | - in case of error, when exceptions are enabled through the ErrorManager singleton. |
Call this method to upgrade the current application.
Do not suspend the UIThread while waiting for the result of the method otherwise an application’s deadlock can occur.
In case of success the intent "android.intent.action.MY_PACKAGE_REPLACED" is fired.
In case of failure:
- if the problem is found before contacting the remote service an error is returned; the error code is one of the PackageInstallerException
error constants, but when exceptions are enabled @throws PackageInstallerException
.
- if the problem is found in the remote service the intent "com.datalogic.app.UPGRADE_ME_STATUS" is fired.
The extra data of the "com.datalogic.app.UPGRADE_ME_STATUS" are:
- "android.content.pm.PackageInstaller.EXTRA_STATUS" int
: a possible error code, matching one of the PackageInstallerException
error constants.
- "android.content.pm.PackageInstaller.EXTRA_STATUS_MESSAGE" String
: an error string message.
- "android.content.pm.PackageInstaller.EXTRA_PACKAGE_NAME" String
: Package Name of the application.