Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to catch application uninstalling on device and let server know about this (iOS/Android)

Problem Description:

We have a service which has applications for main mobile OS’s. We use push notifications. When user is log in, we store his device authorization data (lets say token) for later use in the push service. The problem is about few device authorizations for one user and properly keeping them valid when the user uninstall the application.

Example:

I gave my login to system to a few people, in case to try it. They logged in through the mob. application and the system automatically add a few device authorizations into database (tokens). So now we have N device tokens for 1 user. So that if we send push notification everyone will receive it. Now, suppose those who have installed applications want to uninstall it. Without logout they uninstall application through application manager. And at this time we have NOT VALID data for authorized device. And if we try to notify them, notification will be sent nowhere. Which is wrong, and useless work for server. How to let the core know that some of stored data is no longer valid?

Shortly – is there any possibility in Android / iOS to trigger application delete event. If the application is being delete application call server to clean-up data in the storage. Or if the application is open and the user uninstall it, would there onDestroy() trigger fired? Or some other?

I’m not iOS developer, not Android developer, just know a little about second one and nothing of the first. Any advice will be appreciated. Thanks in advance.

like image 857
devdRew Avatar asked Jan 10 '12 12:01

devdRew


People also ask

Is it possible to detect Android app uninstall?

Detection of app uninstalls can be made by sending silent push notifications. Notifications that are not created on the devices of the app users are called silent push notifications. You can keep track of app uninstalls by sending silent push notifications to all devices where your app is installed.

How do you know my app is uninstalled from the device IOS?

You can detect app uninstalls by sending 'silent' push notifications. Silent push notifications are those notifications that aren't rendered on the user's device. You could send a silent push notification daily to all the devices with your app to track uninstalls.

How do you know my app is uninstalled from the device?

Open the Google Play app on your Android phone or tablet, and tap on the menu button (the three lines that show up in the upper left corner). When the menu is revealed, tap on "My apps & games." Next, tap on the "All" button, and that's it: you'll be able to check all your apps & games, both uninstalled, and installed.


2 Answers

I cannot speak for iOS. You cannot get control when your application is uninstalled in Android.

like image 72
CommonsWare Avatar answered Nov 08 '22 12:11

CommonsWare


That depends on which push service you are using. Afaik, if you are using C2DM, the act of uninstalling the application will automatically unregister it from C2DM.

Edit:

Oh, and about iOS - afaik it does not directly track uninstalled apps, it does however come with a failed notification feedback service that after a sequence of failed notifications (reported by the device to the push network) will notify you - allowing you to clean up after an uninstalled app.

like image 37
Jens Avatar answered Nov 08 '22 11:11

Jens