DrFred
DrFred

Reputation: 471

Start intent on package_removed

I have this code for checking app uninstall:

    public void onReceive(Context context, Intent intent){
    final String action = intent.getAction();
        if("android.intent.action.PACKAGE_REMOVED".equals(action)){
        // some action
    }

Now I want get the start intent from the uninstalled app. Is it possible?

Upvotes: 1

Views: 254

Answers (2)

Yury
Yury

Reputation: 20936

I guess the only way to discover this is to test this. You can use the following code to find the launch intent of an application:

final Intent launchIntent = pm.getLaunchIntentForPackage(packageName);

where pm - is PackageManager.

To my point of view this is impossible and you'll receive launchIntent equal to null. But you should check this on your own.

Upvotes: 1

Name is Nilay
Name is Nilay

Reputation: 2783

Refer to following URLs:

The Post by Janusz is very helpful here..

Sadly android at the moment does not give you a possibility to perform code at the moment your app is uninstalled.

All the settings that are set via the SharedPreferences are deleted together with everything in the Aplication Data an Cache folder.

The only thing that will persist is the data that is written to the SD-Card and any changes to phone settings that are made. I don't know what happens to data that is synchronized to the contacts through your app.

Upvotes: 1

Related Questions