D
D
DARKENN2019-08-18 23:47:10
Android
DARKENN, 2019-08-18 23:47:10

How to change the main (Launch) activity during authorization?

How to change the launch activity to another one after authorization through firebase?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
DARKENN, 2019-08-19
@DARKENN

mAuth = FirebaseAuth.getInstance();
        FirebaseUser user = mAuth.getCurrentUser();
        if (user != null) {
            Intent intent = new Intent(ACTIVITY.this, User.class);
            startActivity(intent);
            finish();
        }

T
tiroman, 2019-08-19
@tiroman

You make the main activity a conditional LoginActivity, at the start you check whether you are logged in or not, if yes, then start the main activity and do finish for this one, if not, then leave the current activity, when you enter the login and successful authorization, you start the main one and close this one

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question