Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sharedPref = getSharedPreferences("sharedPref", Context.MODE_PRIVATE); // get the sharedpreference set named "A"
- String UserId; // get value from key but return 0 if nothing is set
- UserId = sharedPref.getString("firebasekey", "");
- Toast.makeText(this,UserId,Toast.LENGTH_SHORT);
- if (UserId != ""){
- Intent intent = new Intent(splash_launcher.this, userload.class);
- startActivity(intent);
- finish();
- } if (UserId == "") {
- Intent intent1 = new Intent(splash_launcher.this, First_login.class);
- startActivity(intent1);
- finish();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement