C# Class SharpAdbClient.DeviceCommands.PackageManager

Allows you to get information about packages that are installed on a device.
ファイルを表示 Open project: ArduPilot/MissionPlanner Class Usage Examples

Public Methods

Method Description
GetVersionInfo ( string packageName ) : SharpAdbClient.DeviceCommands.VersionInfo

Requests the version information from the device.

InstallPackage ( string packageFilePath, bool reinstall ) : void

Installs an Android application on device.

InstallRemotePackage ( string remoteFilePath, bool reinstall ) : void

Installs the application package that was pushed to a temporary location on the device.

PackageManager ( DeviceData device, bool thirdPartyOnly = false ) : Exceptions

Initializes a new instance of the PackageManager class.

RefreshPackages ( ) : void

Refreshes the packages.

UninstallPackage ( string packageName ) : void

Uninstalls a package from the device.

Private Methods

Method Description
RemoveRemotePackage ( string remoteFilePath ) : void

Remove a file from device

SyncPackageToDevice ( string localFilePath ) : string

Pushes a file to device

ValidateDevice ( ) : void

Method Details

GetVersionInfo() public method

Requests the version information from the device.
public GetVersionInfo ( string packageName ) : SharpAdbClient.DeviceCommands.VersionInfo
packageName string /// The name of the package from which to get the application version. ///
return SharpAdbClient.DeviceCommands.VersionInfo

InstallPackage() public method

Installs an Android application on device.
public InstallPackage ( string packageFilePath, bool reinstall ) : void
packageFilePath string /// The absolute file system path to file on local host to install. ///
reinstall bool /// if re-install of app should be performed; otherwise, /// . ///
return void

InstallRemotePackage() public method

Installs the application package that was pushed to a temporary location on the device.
public InstallRemotePackage ( string remoteFilePath, bool reinstall ) : void
remoteFilePath string absolute file path to package file on device
reinstall bool set to if re-install of app should be performed
return void

PackageManager() public method

Initializes a new instance of the PackageManager class.
public PackageManager ( DeviceData device, bool thirdPartyOnly = false ) : Exceptions
device DeviceData /// The device on which to look for packages. ///
thirdPartyOnly bool /// to only indicate third party applications; /// to also include built-in applications. ///
return Exceptions

RefreshPackages() public method

Refreshes the packages.
public RefreshPackages ( ) : void
return void

UninstallPackage() public method

Uninstalls a package from the device.
public UninstallPackage ( string packageName ) : void
packageName string /// The name of the package to uninstall. ///
return void