I currently have implemented auto login, there is only a slight problem.
If a user logs in, I save their data in SharedPreferences.
Now, when the re opens the app it opens to the login screen makes an API call to check if the login is successful with the current SharedPreferences credentials.
Then if it returns 200 it pushes them to the home page of the application.
The problem is that there is a slight delay when the user opens the app because the user is authenticating with the backend. So we see the login page for 500ms and then it pushes to the home page.
How can I use a splash screen or something so we dont have this awkward 500ms delay.