use of com.tutuanle.chatapp.utilities.PreferenceManager in project Chat-app by TuTuanLe.
the class OnChatActivity method onCreate.
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
PreferenceManager preferenceManager = new PreferenceManager(getApplicationContext());
FirebaseFirestore database = FirebaseFirestore.getInstance();
documentReference = database.collection(Constants.KEY_COLLECTION_USERS).document(preferenceManager.getString(Constants.KEY_USER_ID));
}
use of com.tutuanle.chatapp.utilities.PreferenceManager in project Chat-app by TuTuanLe.
the class SignInActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
binding = ActivitySignInBinding.inflate(getLayoutInflater());
preferenceManager = new PreferenceManager(getApplicationContext());
if (preferenceManager.getBoolean(Constants.KEY_IS_SIGNED_IN)) {
Intent intent = new Intent(getApplicationContext(), MainScreenActivity.class);
startActivity(intent);
finish();
}
setContentView(binding.getRoot());
initLoginWithGoogle();
setListeners();
}
use of com.tutuanle.chatapp.utilities.PreferenceManager in project Chat-app by TuTuanLe.
the class SearchActivity method initData.
private void initData() {
preferenceManager = new PreferenceManager(getApplicationContext());
firebaseFirestore = FirebaseFirestore.getInstance();
}
use of com.tutuanle.chatapp.utilities.PreferenceManager in project Chat-app by TuTuanLe.
the class SignUpActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
binding = ActivitySignUpBinding.inflate(getLayoutInflater());
setContentView(binding.getRoot());
preferenceManager = new PreferenceManager(getApplicationContext());
setListener();
}
use of com.tutuanle.chatapp.utilities.PreferenceManager in project Chat-app by TuTuanLe.
the class MainScreenActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
binding = ActivityMainScreenBinding.inflate(getLayoutInflater());
setContentView(binding.getRoot());
preferenceManager = new PreferenceManager(getApplicationContext());
setBottomNavigation();
loadUserDetail();
getToken();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
getWindow().setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
}
// getWindow().setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS,
// WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
}
Aggregations