I want a specific user form firebase to access the activity with if statement by comparing current user ID with this ID = 47NiYA7rGNa8nJvlnnxzpxhqvCl2.
firebaseAuth = FirebaseAuth.getInstance();
FirebaseUser user = firebaseAuth.getCurrentUser();
String USER = user.getUid();
if (USER == "47NiYA7rGNa8nJvlnnxzpxhqvCl2"){
finish();
startActivity(new Intent(this, MainActivity.class));
}
But it does not work.