PackageManager Class AndroidLib - Beatsleigher Edition
The PackageManager class is a wrapper class for Android's pm executable. This class provides methods and functions for interacting with the pm executable. This class is inheritable.
Inheritance Hierarchy

SystemObject
  RegawMOD.AndroidPackageManager

Namespace: RegawMOD.Android
Assembly: AndroidLib (in AndroidLib.dll) Version: 1.5.2.0 (1.5.2.0)
Syntax

public class PackageManager

The PackageManager type exposes the following members.

Constructors

  NameDescription
Protected methodPackageManager
Creates a new instance of this class. Is only visible within the RegawMOD.Android namespace of the library.
Top
Methods

  NameDescription
Public methodClear
Clears data associated with a package m_package. This method takes a package (e.g.: com.myapp.application) as an argument.
Public methodCreateUser
Creates a new user profile on the device.
Public methodDisableUser
Disables a user on the device.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetPackagePath
Gets and returns the path of a given package. E.g: Package: org.telegram.messenger Path: /data/app/org.telegram.messenger-2/base.apk
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodInstallPackage
Installs an application file (*.apk) that is on the device (internal memory or SD card). The application can be installed using multiple parameters provided by this method. It is recommended you query for the file on the device before calling this method.
Public methodListFeatures
Gets and returns a list of features on the associated Device
Public methodListLibraries
Gets and returns a list of all the libraries the associated device supports.
Public methodListPackages
Queries for and lists all packages on the associated device (m_device).
Public methodListPermissionGroups
Public methodListPermissions
Gets a [!:System.Collections.Generic.List] containing all the permissions on the associated Android device.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRemoveUser
Removes (deletes) a user from the device.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodUninstallPackage
Uninstalls an application from a given device. This method takes a package (e.g.: com.myapp.application) as the argument to determine the to-uninstall app.
Top
Fields

  NameDescription
Private fieldm_device
Top
Remarks

Add remarks here. Use following format: {Date}, {Name}: {Changes/Remarks}
Examples

Example use of this class: C#:
public class MyClass {
private readonly AndroidController m_adbController;
private PackageManager m_pkgManager;
public MyClass() { this.m_adbController = AndroidController.Instance; Init(); }
private void Init() {
var m_device = m_adbController.GetConnectedDevice(m_adbController.ConnectedDevices[number]);
m_pgkManager = m_device.PackageManager;
}
// Do something with the <c>PackageManager</c> class.
}
Visual Basic:
Public Class MyClass
Private ReadOnly m_adbController As AndroidController
Private ReadOnly m_pkgManager As PackageManager
Public Sub New()
Me.m_adbController = AndroidController.Instance
Init()
End Sub
Private Sub Init()
Dim m_device As Device = m_adbController.GetConnectedDevice(m_adbController.ConnectedDevices(number))
Me.m_pkgManager = m_device.PackageManager
End Sub
' Do something with the <c>PackageManager</c> class.
End Class
See Also

Reference