Fill widget with Firebase

My application uses the Firebase database, and the elements display correctly in RecyclerView, but I want to display them also in widgets. Since the widget is not an activity, I run into all the problems using Firebase and ListView. Is there a way to populate a widget from Firebase?

+4
source share
1 answer

For more than 20 seconds, onDataSetChanged () to retrieve data from the Internet / Firebase database does not display data as a list of widgets. You will need to use CountDownLatch.

See also an example https://github.com/mvescovo/item-reaper

https://github.com/mvescovo/item-reaper/blob/master/app/src/main/java/com/michaelvescovo/android/itemreaper/widget/WidgetListService.java

-1
source

Source: https://habr.com/ru/post/1658659/


All Articles