I'm trying to insert a new user record in to my Firebase database:
databaseReference .child("users") .child(firebaseUser.getUid()) .setValue(User.fromFirebaseUser(application.firebaseUser)) .addOnSuccessListener(new OnSuccessListener<Void>() { @Override public void onSuccess(Void aVoid) { startActivity(MainActivity.createIntent(SplashActivity.this)); finish(); } }) .addOnFailureListener(new OnFailureListener() { @Override public void onFailure(@NonNull Exception e) { showSnackbar(R.string.error_user_registration_failed); } }) .addOnCompleteListener(new OnCompleteListener<Void>() { @Override public void onComplete(@NonNull Task<Void> task) { Log.d(TAG, "complete"); } }); But nothing happens. There is no messages from logcat and none of the listeners get hit.
My permissions are the default (must be authenticated) and I've made sure I am. A call to firebaseUser.getUid() just before the database call returns the current userId as expected.
I've triple checked all my dependencies and made sure my google-services.json file is up to date.
I've tried to enable debugging via firebaseDatabase.setLogLevel() but for some reason Logger.Level doesn't contain the enums (they're obfuscated?)
Am I missing something?
setLogLevel()problem here: stackoverflow.com/q/44468817/4815718