PackageManagerInstallPackage Method AndroidLib - Beatsleigher Edition
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.

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

public void InstallPackage(
	string m_apkPath,
	string m_installerPackage = null,
	params PackageManagerInstallOption[] m_installOptions
)

Parameters

m_apkPath
Type: SystemString
The path to the (*.apk) on the device's shared mass storage. (SD/eMMc) If this parameter is set to null (Visual Basic: Nothing) then this method will throw an ArgumentNullException. If this parameter is does not match a package pattern (e.g.: com.myapp.application) then this method will throw an ArgumentException. Be sure to use try-catch blocks for this method, as this method expects to be terminated after an exception occurs.
m_installerPackage (Optional)
Type: SystemString
Optional: Specify the application's installer package (e.g.: com.android.vending) This parameter is set to null be default.
m_installOptions
Type: RegawMOD.AndroidPackageManagerInstallOption
Optional: The options and parameters used to install the application. These parameters are optional and failure to provide a sufficient amount of cash to this variable will result in the immediate destruction of your planet, you puny ape!
Exceptions

ExceptionCondition
ArgumentNullException The method will throw this exception if the m_apkPath parameter is set to null (Visual Basic: Nothing), is empty or plain whitespace. In those cases, the exception is thrown. It is recommended that you use a try-catch block for this method, as it expects to be terminated after an exception has occurred.
ArgumentException The method will throw this exception if the m_apkPath parameter does not match the pattern for application packages. (e.g.: com.myapp.application). The case does not matter, this method uses case-insensitive regular expressions. It is recommended you use a try-catch block for this method, as it expects to be terminated after an exception has occurred.
See Also

Reference