Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. sharedPref = getSharedPreferences("sharedPref", Context.MODE_PRIVATE); // get the sharedpreference set named "A"
  2. String UserId; // get value from key but return 0 if nothing is set
  3. UserId = sharedPref.getString("firebasekey", "");
  4. Toast.makeText(this,UserId,Toast.LENGTH_SHORT);
  5. if (UserId != ""){
  6. Intent intent = new Intent(splash_launcher.this, userload.class);
  7. startActivity(intent);
  8. finish();
  9. } if (UserId == "") {
  10. Intent intent1 = new Intent(splash_launcher.this, First_login.class);
  11. startActivity(intent1);
  12. finish();
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement