iammert / AndroidArchitecture

Recommended architecture by Android
888 stars 192 forks source link

[QUESTION] What if we don't need to use a database when using NetworkBoundResource? #10

Open RJ-Clegg opened 6 years ago

RJ-Clegg commented 6 years ago

It seems NetworkBoundResource works on the bases that, the data is stored in the DB. I have data I want to fetch from an API, however this data won't be stored in the DB as it does not need to live longer than the activity's lifecycle. How could we still use NetworkBoundResource in this case?

chiftenj commented 4 years ago

as in this the single source of true is database so you need to write your own NetwrokBoundResource and add data source to api livedatas. or remove data in database each time, i know it's been past but worth for others to read