Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android devices: "first run" wrongly reported after uninstallation/reinstallation, when Google backup is ON on an Android device #2

Open
slefter opened this issue Dec 29, 2023 · 0 comments

Comments

@slefter
Copy link

slefter commented Dec 29, 2023

The code assumes that _firstRunSettingsKey does not exist in shared preferences immediately after the app installation.

However, if the Android device's automatic backups setting is ON, the device data will be backed up once per day (and saved in the user's Google Drive account).

After the first backup is made, an uninstall/install will first automatically restore (behind the scene) any previously backed-up app data (shared preferences included), BEFORE the app is started "for real".
Therefore, _firstRunSettingsKey will be present when the app starts, and so the package will report that the app isn't run for the first time, which is not correct, since it was uninstalled & installed.

NB: this can be reproduced (1) if automatic Google backups is set to ON on the Android device, (2) after more than 1 day after the first installation, allowing time to Android to automatically backup the app data, and (3) if the device has an internet connection, which is usually the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant