Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8632957
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T09:25:21+00:00 2026-06-12T09:25:21+00:00

The problem is this — my app gets admin rights, to get them, from

  • 0

The problem is this — my app gets admin rights, to get them, from UI POV is quite easy. However once app has those rights, it is cumbersome to uninstall it (user has to first revoke those admin rights; and if not, when uninstalling there is no info what is going wrong with uninstall — at least at Ace 2 Android 2.3).

Thus it would be useful, to have a uninstall feature in app — it would revoke admin rights first, and then follow normal uninstall.

Another approach would be to be notified app is about to be uninstalled, however AFAIK it is not possible — see: http://code.google.com/p/android/issues/detail?can=2&q=33315&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars&id=33315

So far I came up only with workaround — to save user a problem add a button “clear for uninstall” with status info if app is ready to be uninstalled. But then user has to make another step of uninstalling my app. Troublesome anyway.

So — how to uninstall self?

Solution

Just in sake to keep the code on SO site:

Uri packageURI = Uri.parse("package:"+MyMainActivity.class.getPackage().getName());
Intent uninstallIntent = new Intent(Intent.ACTION_DELETE, packageURI);
startActivity(uninstallIntent);

the code is copied from Android Tales Blog.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T09:25:22+00:00Added an answer on June 12, 2026 at 9:25 am

    Take a look on these couple of questions (they are related to installation/uninstallation)

    Implicit intent to uninstall application?

    install / uninstall APKs programmatically (PackageManager vs Intents)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The problem this time is to get the median of three values (easy) I
My app uses a WebRequest at certain points to get pages from itself. This
I have this pattern written ^.*\.(?!jpg$|png$).+$ However there is a problem - this pattern
ive a similar problem as this guy: Generate SQL CE database from EF Code-First
Problem This code: select x::text from regexp_matches( 'i1 into o2, and g1 into o17',
i have this problem this is the display from my view.php id menu +1
I'm getting a problem this morning with Facebook and a Facebook app. I just
Problem This question actually came up at work today. We are planning an experiment
Problem : This is a probably a very basic question, but how do I
I'm running in to the same problem this individual has . Specifically, I'm trying

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.