1
How do I get this information out of the onDataChange
in the same activity everything within the onCreate
....
mDatabase.addListenerForSingleValueEvent(new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot dataSnapshot) {
String teste = (String) (dataSnapshot.child("texto").getValue());
}
@Override
public void onCancelled(DatabaseError databaseError) {
}
});
Thank you in advance!
I have that doubt too!!
– TiagoIB
I’m having to do a lot of code because of this, type to using badge in my menu Drawer, only I can not pass the result in the oncreate of the main menu, then I have to make a code in the login and go through
putExtra
and pass on the same information to adjacent activities to always keep Drawer informed, it sucks :)– Wallace Roberto