Passing Firebase Data From One Activity To Another Via Clickable Listview
In my attempt to pass firebase data from a list view into a separate activity I have come across the following error with putting the data into the list initially. Any assistance i
Solution 1:
You are passing to your list a String and not a ReportInformation
object as the list is declared. To solve this, you should get the data as an object of that class. So please change the following lines of code:
String title = ds.child("title").getValue(String.class);
String content = ds.child("content").getValue(String.class);
String timestamp = ds.child("timestamp").getValue(String.class);
list.add(title + "\n" + timestamp + "\n" + content);
to
ReportInformation reportInformation = ds.getValue(ReportInformation.class);
list.add(reportInformation);
Post a Comment for "Passing Firebase Data From One Activity To Another Via Clickable Listview"