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?
Asked
Active
Viewed 80 times
2

Wayne Conrad
- 103,207
- 26
- 155
- 191

Near1999
- 1,547
- 2
- 18
- 37
-
Might not be what you want, but also have a look at [Firebase](https://www.youtube.com/watch?v=2J6spwAVP0M) when you have te time. – Mikel Mar 07 '16 at 11:38
-
@Mikel, server uses MySQL DB :( – Near1999 Mar 07 '16 at 12:46
2 Answers
0
There are lots of ways to achieve synchronisation in android.
- You can use SyncAdapter (Highly recommended).
- 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