Add data to Firebase

Asked

Viewed 165 times

0

I need help later because I’m having difficulty inserting new data in firebase.

I am developing an application for my TCC where it is possible to register and as soon as I can log in have an option to add more user data. ex: Photo, nickname, phone, etc..

My difficulty is that it is always creating a new key in the database, it is not adding the data in the current user table.

inserir a descrição da imagem aqui

I need the data (nickname, phone and profileImage) stay inside the user who logged in.

inserir a descrição da imagem aqui

  • 1

    Use mUserdatabase.child("usuario").child(userId).setValue(instanciaDaSuaClasseUsuarioOuMapa)

  • So I did the same way you mentioned, but when I ask my user class has error.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.