We have an application which on start up pulls up a Terms and Conditions screen. When the user declines these terms we have to ask the user if he wishes to delete the package.
So, from within the application we launch the following intent:
Uri uninstallUri = Uri.parse("package:some.package.name");
Intent intent = new Intent(Intent.ACTION_DELETE, uninstallUri);
startActivity(intent);
This brings the Settings-> Manage Applications -> Uninstall page for our application.
The user can go ahead and uninstall the pacakge. But when he chooses not to(by pressing Cancel) he is taken to our Terms and Conditions Activity. If he presses Back again, he is taken out of application. The problem is that now if we pull the launcher menu, our application icon does not show up. We can see it in the "Recently Launched application list" and the application is still there on the device.
Is this because PackageManager disabled our application? If so, how do we re-enable it?
What did we miss here?
Please help.
Thanks.