0
Good afternoon I wanted to know if it is possible to get the phone ID for the same functions or as in the example below. I want to put the ID that’s marked black under the "SMS". Is it possible to put? How can I do it? Below is the code.
private static final String TAG = FirebaseDatabaseHelper.class.getSimpleName();
private DatabaseReference databaseReference;
public TelaPolicia(){
demoRef = FirebaseDatabase.getInstance().getReference();
}
public void createUserInFirebaseDatabase(String userId, FirebaseUserEntity firebaseUserEntity){
Map<String, FirebaseUserEntity> user = new HashMap<String, FirebaseUserEntity>();
user.put(userId, firebaseUserEntity);
demoRef.child("SMS").setValue(user);
}
I don’t understand exactly what your problem is, but I notice you’re using
setValue
, this will remove all the information already contained in the 'SMS' node and put the current one, and from what you said there, that’s not what you want.– Vitor Ramos
Also: Why did you put the javascript tag on your question? The question seems to be related to Android only.
– Rosário Pereira Fernandes