ahmad bajwa
ahmad bajwa

Reputation: 1068

Android How I can Detect application uninstallation in java

I have create a manual session for my users. If the user uninstalled application I want to end the session. How I can detect the user is going to uninstalled my application by then where I can perform my actions to end the session. So user can login again because I don't want to provide a logout action for user.

Upvotes: 0

Views: 160

Answers (1)

Rezaul Karim
Rezaul Karim

Reputation: 880

Sorry, It is not possible because android does not give you this facility.

By default then, all the data whether in shared preference and cache are deleted. So if you put the session in the shared preference it will automatically deleted.

But if you save any data outside the app data

(~/android/data/com.something/yourappname)

it will remain in the storage. You can save data in shared preference for your purpose. For further info please visit Action package removed Android Developer

Upvotes: 1

Related Questions