Java – set custom key when pushing new data to firebase database
                                        
                    •
                    Java                                    
                Well, I'm a newcomer to firebase. I want to have my own key and push new data to the database at the same time
Question:
FireBase.push().setValue(mapped_values);
This gives the following structure of database output
How can I create my own custom keys@ H_ 419_ 9 @ such as user name or something
Solution
Calling push () will generate a key for you
If you use child (), you can determine their key / path by yourself
ref.child("Victor").setValue("setting custom key when pushing new data to firebase database");
                
                            The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
                        
                                            
                        THE END
                    
                    
                    
                                                        二维码
                        
                        
                                                
                        