Hello everyone,can we access local data using room...
# glance
m
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
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
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
I was not using url Image in glide yet. I did use icons and local drawables.
🙌 1