0

I need to fetch live data in Android App from a NodeJS/MongoDB API. For exemple, I have a list of tasks on the Android screen (fetched from the API). Then one of this documents (tasks) have changed in the MongoDB, the Android screen needs to update the data on the screen once this data have been changed on the server. Can anyone help with some workflow? I am not looking for code. Ideias (Arquitecture/Libs) only.

Thanks in advance!

Jesse Lima
  • 346
  • 4
  • 12

1 Answers1

0

You can do this in two way.

  1. Use silent push notification.

    • When data change in server then server send push notification to app.

    • App receive notification Then app get call API to update Data.

  2. Your app sends a request(s) to server periodically (After some interval of time)

Reference link for same: link1, link2

IftekharDani
  • 3,619
  • 1
  • 16
  • 21
  • 1
    Thanks for your answer. I found out recently that Mongo is launching [MongoDB Mobile] (https://www.mongodb.com/products/mobile). It's in beta but with many interesting features coming. No more need to make turnarounds to make data sync between mobile and the remote server database. According to the page, MongoDB Stitch Mobile Sync is coming soon, and it will ensure that data is kept up to date across phones and all other clients in real time. Another awesome feature that's coming is Offline cache data with auto sync when the connection is back online. – Jesse Lima Oct 23 '18 at 17:53