So i have created an app that works fine on iOS and (most of the times) on Android.
The app is basically a login screen that lets you log in. It saves the login in asyncstorage (infinite login), and when the user is logged in, they are able to see some data from an external API.
This seems to work well in iOS, however when running on android (tested on Marshmallow and nougat) and i try to reload the app, the values from asyncstorage and never seem to run or getting resolved.
The only way for me to reload the app is by closing it completely and closing expo, and then reopen expo, and finally selecting my app. If i do that then i am logged in again and i receive the data from my external api.
Why would this happen?
Here is a siple example:
The following code will not log when reloading the app, but it will load if i exit expo and reopen the app.
AsyncStorage.getItem('myID').then((val) => console.log(val))