notify iOS & Android on data change on server -
i'm creating mobile application ios , android. problem when data has changed on server, cannot notify mobile devices.
i have found 3 solutions, each have minus , pluses.
use push notifications. since ios shows notification user not solution @ all. cannot know if notification go device or when will.
for every x seconds ask server if change exists. don't want that, because creating many http connections , closing them not idea think. if data changed right after device asks, info change on device occur late.
use web socket. application's 1 time usage expectation ~2 minutes. web socket looks choice, because app terminated or go background state , battery consume won't much. server side data changes come device in time. don't know web socket. opinion acceptable? how many concurrent connections can done server. question too.
here solutions. please guys. thank you.
the document suggest assumption 1. above incorrect.
if read the notification payload section, you'll come across this;
the aps dictionary can contain content-available property. content-available property value of 1 lets remote notification act “silent” notification. when silent notification arrives, ios wakes app in background can new data server or background information processing. users aren’t told new or changed information results silent notification, can find out next time open app.
Comments
Post a Comment