0

In my application, I've developed to get a list of third party applications that the user installed. from that, what now I want is to add a button where, when clicked the user is directed to the inbuilt application details screen with the force stop and uninstall option, since I only take user installed application I don't need root permission and as well as system permission. is there a way to call that system intent inside my application.

Imesh Chandrasiri
  • 5,428
  • 13
  • 56
  • 101

2 Answers2

1

try as:

    Intent detailsIntent = new Intent();
    detailsIntent.setClassName("com.android.settings", 
    "com.android.settings.InstalledAppDetails");

    //ApiLevel greater than or equal to 8
    detailsIntent.putExtra("pkg", "Appliction_Package_NAme");

    //ApiLevel in less than 8

    detailsIntent.putExtra("com.android.settings.ApplicationPkgName", 
    "Appliction_Package_NAme");

    startActivity(detailsIntent);
ρяσѕρєя K
  • 130,641
  • 51
  • 193
  • 212
0

try this

   Intent intent = new Intent(Intent.ACTION_DELETE);
   intent.setData(Uri.parse("package:app package name"));
   startActivity(intent);
Vishwanath.M
  • 6,105
  • 10
  • 41
  • 55