简体   繁体   中英

How to detect, if Android App was already installed at the device?

Is it possible to save some information at the device, if user deletes the application from his device? Something like a key-value (fe ("app id","date of installation")) which will not be removed ?

Background: we are working on an application, which has an anonymous user for "exploring the app". This user should be removed, if user logs in. We can cover all cases, but not if user deletes the whole application. In iOS you can achieve this, by saving some values in the iOS-Keychain.

Any ideas or workarounds are welcome!

You have to save the data to some external file. So when you want to get the data you can read the data based on the file path.

Is it possible to save some information at the device, if user deletes the application from his device?

You can put stuff out on external storage in a place that will not be automatically deleted when your app is uninstalled (eg, one of the roots supplied by Environment ). However, the user can delete that file whenever the user wants.

Beyond that, there are no options, specifically so apps do not leave cruft behind that builds up and clutters up the user's device.

we are working on an application, which has an anonymous user for "exploring the app". This user should be removed, if user logs in.

It is unclear what this has to do with your original question.

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