本文介绍了从firebase android检索数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的问题是,我无法阅读我在firebase上的数据,而且我花了三天的时间阅读。
I am studying in France and I have trouble finding French tutorials to solve my problem. I am therefore obliged to ask my question, hoping to have a satisfactory solution.
我开始编写代码,我能够恢复密钥,但是我不能恢复这些值nomargent等。
My problem is that I have trouble reading my data on firebase and I have spent three days on it.
I have a structure like this:
I had started to code something, I was able to recover the key but I could not recuperate these values "nom" "argent" etc .
public void onChildAdded(DataSnapshot dataSnapshot, String s) {
String cle = dataSnapshot.getKey();
String nom = dataSnapshot.child("nom").getValue(String.class);
Toast.makeText(ListeActivity.this,"la cle est : "+cle+" nom est : "+nom ,Toast.LENGTH_SHORT).show();
这篇关于从firebase android检索数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!