PackageInstallerSession Class |
PackageInstallerSession
openSession()
closeSession()
To install two applications using a session do the following steps:
PackageInstaller(Context)
.
PackageInstallerListener
that will be used to handle the
result of the commands invoked on the session.
PackageInstallerSession
calling PackageInstaller.createSession(com.datalogic.device.app.PackageInstallerListener)
.
The PackageInstaller.createSession(com.datalogic.device.app.PackageInstallerListener)
method takes as parameters the instance of PackageInstallerListener
created at the previous step.
openSession()
.
install(java.lang.String, boolean)
to install the first application.
install(java.lang.String, boolean)
to install the second application.
closeSession()
.
The PackageInstallerSession type exposes the following members.
Name | Description | |
---|---|---|
![]() | PackageInstallerSession | Initializes a new instance of the PackageInstallerSession class |
Name | Description | |
---|---|---|
![]() | JniPeerMembers | To be added. |
![]() | ThresholdClass | To be added. |
![]() | ThresholdType | To be added. |
Name | Description | |
---|---|---|
![]() | CloseSession | Call this method to execute the commands queued in the session. |
![]() | Install | Call this method to install the application contained within the . |
![]() | Install | Call this method to install the application contained within the . |
![]() | OnServiceConnected | Callback implemented to receive the asynchronous result of the bindService request. |
![]() | OnServiceDisconnected | Callback implemented to receive the notify that the bind to the service is lost due to a crash of the service. |
![]() | OpenSession | Call this method to start a session. |
![]() | Uninstall | Call this method to unistall an application installed on the device. |
![]() | Upgrade | Call this method to upgrade an application installed on the device. |
PackageInstallerSession
gives developers the ability to group the execution of a sequence of install, uninstall and
upgrade commands.
Once the session is created, the commands install, uninstall, upgrade must be called inside a transaction.
A transaction is opened calling openSession()
and closed and commited calling closeSession()
.
To install two applications using a session do the following steps:
PackageInstaller(Context)
.
PackageInstallerListener
that will be used to handle the
result of the commands invoked on the session.
PackageInstallerSession
calling PackageInstaller.createSession(com.datalogic.device.app.PackageInstallerListener)
.
The PackageInstaller.createSession(com.datalogic.device.app.PackageInstallerListener)
method takes as parameters the instance of PackageInstallerListener
created at the previous step.
openSession()
.
install(java.lang.String, boolean)
to install the first application.
install(java.lang.String, boolean)
to install the second application.
closeSession()
.