Guest User

Untitled

a guest
Nov 22nd, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. @Override
  2. public void onStart() {
  3. super.onStart();
  4. FirebaseApp.initializeApp(this);
  5. mAuth = FirebaseAuth.getInstance();
  6. // Check if user is signed in (non-null) and update UI accordingly.
  7. FirebaseUser currentUser = mAuth.getCurrentUser();
  8. if (currentUser != null) {
  9. //update UI accordingly
  10. } else {
  11. //update UI accordingly
  12.  
  13. }
  14. }
  15.  
  16. dependencies {
  17. implementation fileTree(dir: 'libs', include: ['*.jar'])
  18. implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'
  19. implementation 'com.android.support.constraint:constraint-layout:1.1.3'
  20. implementation 'com.android.support:design:27.1.0'
  21. implementation 'com.google.firebase:firebase-auth:11.6.0'
  22. testImplementation 'junit:junit:4.12'
  23. androidTestImplementation 'com.android.support.test:runner:1.0.2'
  24. androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
  25. }
  26.  
  27. apply plugin: 'com.google.gms.google-services'
Add Comment
Please, Sign In to add comment