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.
Namespace: RegawMOD.Android
Assembly: AndroidLib (in AndroidLib.dll) Version: 1.5.2.0 (1.5.2.0)
Syntax
Parameters
- m_package
- Type: SystemString
The package to remove from the device. 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_keepData (Optional)
- Type: SystemBoolean
If set to true, the application's data will not be touched. Instead it will be kept on the device. This parameter is set to false by default.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | The method will throw this exception if the m_package 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_package 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