K
K
kovurado2021-11-01 20:41:06
Java
kovurado, 2021-11-01 20:41:06

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

1 answer(s)
C
Chesterfield25, 2021-11-02
@Chesterfield25

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 question

Ask a Question

731 491 924 answers to any question