Advertisement
Guest User

Untitled

a guest
Oct 20th, 2014
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. public void auth() throws InterruptedException {
  2. final CountDownLatch cd = new CountDownLatch(1);
  3. firebaseRef.authWithPassword(user, password,
  4. new Firebase.AuthResultHandler() {
  5. @Override
  6. public void onAuthenticated(AuthData authData) {
  7. System.out.println("Auth successful " + authData);
  8. cd.countDown();
  9. }
  10.  
  11. @Override
  12. public void onAuthenticationError(FirebaseError firebaseError) {
  13. System.out.println("Authentication failed " + firebaseError);
  14. cd.countDown();
  15. }
  16. });
  17. cd.await();
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement