2

I need to display some data from the server via my RecyclerView. The problem is how to notify the application that new data is available in the server. I have seen in some applications where the top of the list has a button with text like "Show 5 new posts." After clicking on that button, the 5 new posts download from the server without downloading the entire list of data. How can I implement that same synchronization?

Wayne Conrad
  • 103,207
  • 26
  • 155
  • 191
Near1999
  • 1,547
  • 2
  • 18
  • 37

2 Answers2

0

There are lots of ways to achieve synchronisation in android.

  1. You can use SyncAdapter (Highly recommended).
  2. You can use GCM, push to client if anything new comes up and act accordingly.

Further you can use Local Broadcast Listener to notify that view

UMESH0492
  • 1,701
  • 18
  • 31
0

I think this link will help you to understand the synchronization between android app and server - Sync data between Android App and webserver .

Community
  • 1
  • 1
Ivan Ivanov
  • 902
  • 5
  • 12