Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SharedPreferences pref = getSharedPreferences("a", Context.MODE_PRIVATE);
- if (pref.getBoolean("aa", false)) {
- Intent intent = new Intent(this, A2.class);
- startActivity(intent);
- finish();
- } else {
- SharedPreferences pref1 = getSharedPreferences("a", Context.MODE_PRIVATE);
- SharedPreferences.Editor edt = pref1.edit();
- edt.putBoolean("aa", true);
- edt.commit();
- }
Add Comment
Please, Sign In to add comment