قالب وردپرس درنا توس
Home / IOS Development / android – How do you send live, continuously update data from REST API to mobile apps?

android – How do you send live, continuously update data from REST API to mobile apps?



Should I create an outlet and have a shelf server like
pumping out data

This is an alternative. I know of some top-level games on the gameplay that use plug-in sockets for streaming data.

Have the app periodically vote on a backend resource

I would recommend this. Polling drains the battery. The Android OS will keep the CPU in sleep mode at times, and constant polling can wake up the CPU and cause drainage in the battery. The users won't like it. You also consume processor power when there are no server results.

The easiest way to send push notifications / minor updates on the android phone is via GCM. The GCM messages are delivered in near real time (I noticed a team in about a second for my apps). The load is limited to 4k and the messages are stored for up to 4 weeks. This is another option you can consider based on your business case.


Source link