https://kotlinlang.org logo
#glance
Title
# glance
m

Mehmet Peker

03/06/2022, 2:20 AM
Hello everyone,can we access local data using room library? If we can how can i do?What is the correct way creating database instance and using this instance?If we can't what do you recommend me for accessing local data?
1
p

Piotr Prus

03/08/2022, 11:13 AM
You should not access your local database from widget. Widget should not know where the data came from. You should use WorkManager to fetch the data from room and update the glance widget from
doWork
function. Widget should only display it.
m

Mehmet Peker

03/08/2022, 11:20 AM
I was wondering about this too. Then I can also make a http query in work manager.Thank you very much for your help, it's good to know that.
👍 1
@Piotr Prus Do you have knowledge about how to load image to glance image provider?Glide or coil work with it?
+from api
p

Piotr Prus

03/08/2022, 12:40 PM
I was not using url Image in glide yet. I did use icons and local drawables.
🙌 1
5 Views