简体   繁体   中英

Android - How to handle if user uninstall the app

I have create a app where which have a setup which is equal to many other app.

  1. Open app and create a user, where phonenumber is a part of the information.
  2. Everyone with the app would see there phonebook on a view
  3. If there is a match between a phonebookumber and a indication if a contact person do have a create a account in the app.

If a user have uninstall the app the match in (3) show be remove.

The Viber app shows who you should be able to call but I guess it need to handle situation where users have uninstall the app, for removing the match.

Does any one have ideas how this is handle in other apps?

To make sure that you always have a list of user and profile numbers on your server I would implement:

  1. When the user installs the app, a notification is send to the server which contains the number of the current phone/profile.
  2. Several times a day the app sends a notification to server if the app is still installed on a phone with the selected phone number.

By this, the server should more or less know, which accounts are linked to which phone numbers at each given moment. 2. is necessary because it is not possible to start any services when the app is removed. You could start also start 2. by an broadcast receiver when the phone is connected to a wifi.

Then, if the user opens your app and checks out which other contacts from the phonebook have a profile, your application could check that with the server.

You should implement services for these tasks.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM