0

Am new for android development am really confused where to start with even after lots of research.

I made a connection with server and fetched the data successfully and I stored it in sharedpreferences when ever the recent data is updated in server that must be displayed and saved into my sharedpreferences. how can I achieve this so far I have used volley to make connection with server how to fetch only recent data from server is there any idea for that as beginner.

I really confused how to do this This may be dumb question but as of now I struck with this Please share your ideas !!!

Dhaval Parmar
  • 18,812
  • 8
  • 82
  • 177

2 Answers2

0

you can make it simple using one of below way

  1. you have to ask server for get data every time you enter in app. if server have new data then fetch from server.

  2. use Google Cloud Push Notification in your app. whenever new data found server will notify your app that new data arrive then you have to fetch data from server

Dhaval Parmar
  • 18,812
  • 8
  • 82
  • 177
0

You may do like this

  1. Create a service which gets updated data after some interval from server.
  2. add some column like resent=true by default in table.
  3. For checking recent or not add unique id when request first time get all data that have recent=true and after getting data set it as recent false.
Mahesh Giri
  • 1,810
  • 19
  • 27