June 2018
Beginner to intermediate
394 pages
9h 2m
English
The name clearly states that the application allows users to access the application's features by providing a temporary anonymous identity. We need to enable anonymous login in the Firebase console. Next, the anonymousSignIn method calls the signInAnonymously() method of the FirebaseAuth instance:
public void anonymousSignIn() { FirebaseAuth.signInAnonymously() .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() { @Override public void onComplete(@NonNull Task<AuthResult> task) { if (!task.isSuccessful()) { Toast.makeText(AnonAuthActivity.this, "Authentication failed. " + task.getException(), Toast.LENGTH_SHORT).show(); } else { softButton.setText("Create an Account"); buttonMode = CREATE_MODE; } }
Read now
Unlock full access