Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

how to check if user is logged in firebase android and then load another activity

 private FirebaseAuth firebaseAuth;
 FirebaseAuth.AuthStateListener mAuthListener;
    firebaseAuth = FirebaseAuth.getInstance();

      mAuthListener = new FirebaseAuth.AuthStateListener(){
                @Override
                public  void  onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth){
            FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();
        if(user!=null){
        Intent intent = new Intent(LoginActivity.this, MainActivity.class);
        startActivity(intent);
        finish();
}
                }


            };
Comment

PREVIOUS NEXT
Code Example
Java :: how to use a combo box in java with if else 
Java :: generate uuid from string 
Java :: how to use do while loop in java 
Java :: There is no client authentication. Try adding an appropriate authentication filter 
Java :: java extends 
Java :: java leap years 
Java :: mac java version terminal 
Java :: view all certificates from keystore java 
Java :: continue in java 
Java :: basic java programs 
Java :: how to convert arraylist to iterable in java 
Java :: No suitable driver found for jdbc:mysql 
Java :: centos 8 install java 16 
Java :: breadth first search bst java 
Java :: java char stream to string 
Java :: JFrame frame = new JFrame (); 
Java :: java concatenate strings 
Java :: java throws keyword 
Java :: settext java 
Java :: initialize hashmap java 
Java :: como crear un array list en java 
Java :: remove spaces java 
Java :: get all enum values java 
Java :: spring xml configuration 
Java :: initilize an array java 
Java :: how to convert errorBody to pojo in retrofit 
Java :: Missing artifact com.sun.jersey:jersey-servlet:jar:1.20-SNAPSHOT 
Java :: max int array java 
Java :: how to set path for java in windows 10 
Java :: java calcuate milliseconds since 1970 
ADD CONTENT
Topic
Content
Source link
Name
2+9 =