Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.example.tom.hello;
- import android.os.Bundle;
- import android.support.v7.app.AppCompatActivity;
- import android.view.View;
- import android.widget.EditText;
- import android.content.Context;
- import com.google.firebase.FirebaseApp;
- import com.google.firebase.auth.FirebaseAuth;
- import com.google.firebase.auth.FirebaseUser;
- import java.util.HashMap;
- import java.util.Map;
- import java.util.SortedMap;
- import java.util.TreeMap;
- public class MainActivity extends AppCompatActivity {
- private FirebaseAuth mAuth;
- private FirebaseUser user;
- Context appInit;
- EditText myEdEmail;
- EditText myPassword;
- Map<EditText, EditText> newAccount;
- SortedMap<String, String> config = new TreeMap<>();
- SortedMap<String, String> subM = config.subMap("a","d");
- //SortedMap<String, String> subM;
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_main);
- myEdEmail = findViewById(R.id.myEmail);
- myPassword = findViewById(R.id.myPwd);
- config = new TreeMap<>();
- config.put("apiKey","AIzaSyAYX-QwTLWW9sZ9j3sOpg41bfaTluWFPuc");
- config.put("authDomain","streess-1ce14.firebaseapp.com");
- config.put("databaseURL","https://streess-1ce14.firebaseio.com");
- config.put("projectId", "streess-1ce14");
- config.put("storageBucket","streess-1ce14.appspot.com");
- config.put("messagingSenderId","93285745167");
- //SortedMap<String, String> subM = config.values();
- mAuth = FirebaseAuth.getInstance();
- user = mAuth.signInWithEmailAndPassword("example@email.com","example");
- newAccount = new HashMap<>();
- newAccount.put(myEdEmail,myPassword);
- //System.out.println(config.values());
- //appInit = FirebaseApp.initializeApp(config.values());
- }
- @Override
- public void onStart() {
- super.onStart();
- FirebaseUser currentUser = mAuth.getCurrentUser();
- //updateUI(currentUser);
- }
- public void sendAccount(View v) {
- //myEdEmail.setText(myEmail);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement