Receive push data even if app is in background

Hi there!

I build an app which receives data from a server. To receive data in realtime, I use socketIO, which works well when the app is currently opened.

Now I want to receive data from the server, even if the app is in background or device is restarted.

So:

  1. Server has new data (object) to send to specific users
  2. Server sends data to specific users
  3. Users get data in background and saves it locally
  4. Notify if data is relevant

I read about this plugin https://github.com/phonegap-build/PushPlugin but I want to save the data first and let the app decide then when data ist relevant to notify the user.

Thanks for help! :smile:

Not sure how to work about this, but it sounds like your app would eat network like cake… Have you thought about the users network plans? I don’t think they like it when they spend their entire data budget on your app… Might be wrong though not sure how much socketIO actually consumes :wink:

I haven’t thought about network plans yet, but I will push only data if user belongs to a specific group and send as less data, as I could. That’s a side problem right now, but thank you :smile:

The core idea is to push data from server (which is dynamically added by other users) to specific users right in time. The app should then save the data locally and notify the user if needed. If data has expired, it will be deleted.