• Jobs
  • About Us
  • professionals
    • Home
    • Jobs
    • Courses and challenges
  • business
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

290
Views
How to sync local database with remote server using Android Paging Library?

DataSource takes all data from local database (Room). BoundaryCallback loads new data from server only when reachs end. But what to do with items stored in room if they already changed/deleted from remote server? App will display it as they are still in our local database.

I read this article Paging Library: Database + Network but I'm not sure if this is only best solution.

Maybe I should create custom DataSource and DataSourceFactory which will get page from local database and async load the same page from remote server. Then remove local page from database and insert this new page. But it sounds even worse than in that article.

Is there a correct way to sync local database with remote database?

about 3 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Our process Sales
Legal
Terms and conditions Privacy policy
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recommend me some offers
I have an error