Advertisement
Parkie

Untitled

Mar 16th, 2018
262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.16 KB | None | 0 0
  1. package com.example.tom.hello;
  2.  
  3. import android.os.Bundle;
  4. import android.support.v7.app.AppCompatActivity;
  5. import android.view.View;
  6. import android.widget.EditText;
  7. import android.content.Context;
  8.  
  9. import com.google.firebase.FirebaseApp;
  10. import com.google.firebase.auth.FirebaseAuth;
  11. import com.google.firebase.auth.FirebaseUser;
  12.  
  13. import java.util.HashMap;
  14. import java.util.Map;
  15. import java.util.SortedMap;
  16. import java.util.TreeMap;
  17.  
  18. public class MainActivity extends AppCompatActivity {
  19.  
  20.     private FirebaseAuth mAuth;
  21.     private FirebaseUser user;
  22.     Context appInit;
  23.     EditText myEdEmail;
  24.     EditText myPassword;
  25.     Map<EditText, EditText> newAccount;
  26.     SortedMap<String, String> config = new TreeMap<>();
  27.     SortedMap<String, String> subM = config.subMap("a","d");
  28.     //SortedMap<String, String> subM;
  29.  
  30.     @Override
  31.     protected void onCreate(Bundle savedInstanceState) {
  32.         super.onCreate(savedInstanceState);
  33.         setContentView(R.layout.activity_main);
  34.  
  35.         myEdEmail = findViewById(R.id.myEmail);
  36.         myPassword = findViewById(R.id.myPwd);
  37.         config = new TreeMap<>();
  38.         config.put("apiKey","AIzaSyAYX-QwTLWW9sZ9j3sOpg41bfaTluWFPuc");
  39.         config.put("authDomain","streess-1ce14.firebaseapp.com");
  40.         config.put("databaseURL","https://streess-1ce14.firebaseio.com");
  41.         config.put("projectId", "streess-1ce14");
  42.         config.put("storageBucket","streess-1ce14.appspot.com");
  43.         config.put("messagingSenderId","93285745167");
  44.         //SortedMap<String, String> subM = config.values();
  45.         mAuth = FirebaseAuth.getInstance();
  46.         user = mAuth.signInWithEmailAndPassword("example@email.com","example");
  47.         newAccount = new HashMap<>();
  48.         newAccount.put(myEdEmail,myPassword);
  49.         //System.out.println(config.values());
  50.         //appInit = FirebaseApp.initializeApp(config.values());
  51.     }
  52.  
  53.     @Override
  54.     public void onStart() {
  55.         super.onStart();
  56.  
  57.         FirebaseUser currentUser = mAuth.getCurrentUser();
  58.        
  59.         //updateUI(currentUser);
  60.     }
  61.  
  62.     public void sendAccount(View v) {
  63.  
  64.         //myEdEmail.setText(myEmail);
  65.  
  66.     }
  67. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement