Created
June 1, 2020 08:11
-
-
Save sumitsahoo/b42bb6f703967cdc29f7bbd8234d21f4 to your computer and use it in GitHub Desktop.
Uninstall app using package name
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add below permission to AndroidManifest.xml file | |
// <uses-permission android:name="android.permission.REQUEST_DELETE_PACKAGES" /> | |
// After that use below code to uninstall an app | |
val intent = Intent(Intent.ACTION_DELETE) | |
intent.data = Uri.parse("package:com.sumit.demo") | |
startActivity(intent) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment