Get KotlinNullPointerException when open initial fragment when init my uid:
fun setInitialData() {
firebaseUser = FirebaseAuth.getInstance().currentUser
databaseReference = FirebaseDatabase.getInstance().reference
uid = firebaseUser!!.uid
But if I replace initialization on firebaseUser?.uid database data will not load immediately.
So understand this the right approach?
Also i understand how extra the decision to do some pause before data is loaded?
firebaseUser?.uid, I have a problem with uploading data.