Recently I publish my mobile application but there is a unique problem. In some devices people download application in google play and easily use the application. But some devices has need to clear all application data from settings then open again because if they don’t do this they can’t see onboarding screen and also can’t fetch data from internet. In flutter I basically use Hive local storage at main dart to route after installation
//Here if onBoard box is true user will see welcomescreen
if (Hive.box('settings').get('onBoard') == true) {
screen = const WelcomeScreen();
}
//Here if user already registered but click sign out button isRegistered box will be false and user
//will go LoginPage again
else if(Hive.box('settings').get('isRegistered') == false){
screen = const LoginPageDesign();
}
//! If on boarding not true (false or null) user will route OnBoarding page
else {
screen = const OnBoarding();
}
2
Answers
}
Interestingly once I tested with internal test, Android 13 real devices has no problem it goes first onBoaring but with Android 10 it goes directly WelcomeScreen I don't understand how it is possible to take true for this situation should always null at fresh start.
EDIT : Problem is interestingly fixed once add another Hive.box for registeration ...
The problem is some android devices backsup local storage data to the cloud. You can go through this article from android: https://developer.android.com/guide/topics/data/autobackup.html
So, to overcome this issue, just navigate to your AndroidManifest and do the following just under application tag: