Google Firebase serialize/deserialize

后端 未结 1 2027
情书的邮戳
情书的邮戳 2021-02-13 23:08

I am new to FIrebase and I have 2 problems with it that might be connected. First one is when saving my list of events.

//creating event
TVEvent tvEvent = new TV         


        
相关标签:
1条回答
  • 2021-02-13 23:23

    try to use

    Map<String, String> data= (HashMap<String, String>)dataSnapshot.getValue();

    instead of

    GenericTypeIndicator<List<Event>> t = new GenericTypeIndicator<List<Event>>() {}; List<Event> list = messageSnapshot.getValue(t);

    0 讨论(0)
提交回复
热议问题