rx-java3

Rxjava 3 + Retrofit2 - multiple inserts to DB problem

风格不统一 提交于 2020-05-15 06:26:38
问题 I am trying to do the following; sync a cloud DB using Retrofit to a local SqLite DB (Room) on a device. The DB could get large, around 100,000 registers or more, so the sync process can take some time. So it send a first Retrofit request to get the number of register, so it can calculate the total number of pages, after that it will send multiple Retrofit Request, to get all the data from API, after each request, it saves the data to Room. Right now, I am having trouble combining two RxJava

Rxjava 3 + Retrofit2 - multiple inserts to DB problem

[亡魂溺海] 提交于 2020-05-15 06:26:25
问题 I am trying to do the following; sync a cloud DB using Retrofit to a local SqLite DB (Room) on a device. The DB could get large, around 100,000 registers or more, so the sync process can take some time. So it send a first Retrofit request to get the number of register, so it can calculate the total number of pages, after that it will send multiple Retrofit Request, to get all the data from API, after each request, it saves the data to Room. Right now, I am having trouble combining two RxJava