Question

I am working on adding a release notes webView when our app is installed either for the very first time or when the app is being reinstalled. My question is on the second part where the user is installing the app on top of an existing one. I thought about deleting the release notes after it is installed but it's not possible to delete a file from assets at run time. Is there a way to determine this case?

Was it helpful?

Solution

How about saving the time when the release note was last shown in SharedPreferences, and checking it against the app install time? On fresh install there will be nothing in SharedPreferences, so you know you need to show the release note.

You can get the app install time this way: How to get app install time from android

OTHER TIPS

You can use SharedPreferences, regular File IO, or an SQLite DB in your app to store persistent information, e.g. a flag indicating if the current release notes have already been displayed or not. This data will "survive" an update of your App.
These data will, however, be deleted when the App is uninstalled from the phone, but I guess that's not a problem in your case.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top