0
I’m trying to get user score from the site: /users/uid/points and set it in a textview.
fb.child("usuarios").child(FirebaseAuth.getInstance().getCurrentUser().getUid()).child("pontos").get().addOnCompleteListener(new OnCompleteListener<DataSnapshot>() {
@Override
public void onComplete(@NonNull Task<DataSnapshot> task) {
if (!task.isSuccessful()) {
Log.e("firebase", "Error getting data", task.getException());
}
else {
textview3.setText(String.valueOf(task.getResult().getValue()));
}
}
});
But I get the following mistake:
The method get() is Undefined for the type Databasereference.