Answer the question
In order to leave comments, you need to log in
How to store login information?
hello, I'm making an app on android studio, did the registration related to firebase, but after logging into the account, in the app, and reloading the app, it asks to login again.
the question is how to fix it, if you need a code, let me know, I’ll say right away, I didn’t do it according to the ready-made android studio template, but through a dialog box.
Answer the question
In order to leave comments, you need to log in
Give code to loginActivity. In general, something like this should work. I'm writing from the phone, so I wrote an approximate solution!
If(пользователь != null) {
startActivity(new Intent(LoginActivity.this, MainActivity.class));
finish();
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question