3

Edit: I've noticed that StackExchange has prefaced this question with Android but it applies for both iOS and Android.

We have a client side iOS/Android application that we expect to run (in remote Australia) with very limited internet connectivity. However, the application can expect to have very good connectivity to its local network, which is not on the net.

I've been looking into ways of waking a phone up with a notification of some sort whenever an event happens on the local server.

From what I've researched:

  • Web push is no good as even the newer VAPID based protocol still wants to route some data through the browser vendor's notifications server.
  • iOS Apple Notifications essentially have the same requirements as Web Push.
  • A background task which periodically polls the server/wakes up a Websockets connection can work, but could end up with pretty long delays between polls.
  • SMS is an option, as although 3G is limited, basic phone connectivity is sometimes available.

Are there any other ways of being able to wake up a locked mobile device with a server-sent event that I haven't listed? Given the operational situation having App Store compliance is not necessarily a requirement.

Cheers

Andrew Lipscomb
  • 936
  • 8
  • 19
  • You could look into sending intents via adb using the LAN – Jahnold Feb 25 '18 at 21:51
  • Are you asking for iOS or Android? They're likely different answers, and half of what you're talking about makes no sense to an Android developer (browser vendor for push notification? Push notifications have nothing to do with browsers). – Gabe Sechan Feb 25 '18 at 22:30
  • @GabeSechan The Push i'm referring to is the [Web Push standard](https://developer.mozilla.org/en/docs/Web/API/Push_API) that has some decent support these days. I'm not making any hard assumptions about _how_ the app would be packaged (native, Cordova, web page from internal server etc) - cross platform-edness would be a nice one to have though. – Andrew Lipscomb Feb 25 '18 at 23:47
  • @GabeSechan The Push i'm referring to is the [Web Push standard](https://developer.mozilla.org/en/docs/Web/API/Push_API) that has some decent support these days. I'm not making any hard assumptions about _how_ the app would be packaged (native, Cordova, web page from internal server etc) - cross platform-edness would be a nice one to have though. – Andrew Lipscomb Feb 25 '18 at 23:48
  • You kind of are though- you're mentioning all web technologies, not normal mobile ones or native ones. MQTT would be the easiest way to solve your problem, but it's not a web technology- hooking it up to any of those would require effort – Gabe Sechan Feb 25 '18 at 23:51
  • Management requires that iOS be supported - and iOS requires its Apple Push Notifications to go through their servers, so we either need internet (impossible in some areas - AU is a big place ;) ) or a more sensible way to do it. – Andrew Lipscomb Feb 26 '18 at 00:11
  • does this help ? seems like what you are trying to achieve "Push notifications in a local network " https://stackoverflow.com/questions/22765019/push-notifications-in-a-local-network – Angel Koh Feb 26 '18 at 01:47
  • 1
    @AngelKoh Its a very similar question - I didn't find that one before. At least in 2014 the answer still seemed to be same - in that at least some of the connection needs to be routed via an internet-accessible third party. I'm hoping that a few years of companies focusing more on offline-first apps might have added new possibilities. – Andrew Lipscomb Feb 26 '18 at 04:08

1 Answers1

0

After doing a fair bit of research, the answer (as of early 2018) is a pretty solid no, at least for a cross platform usecase.

iOS requires that an external notification that can wake the device come from a recognised internet-based source (APNS, and maybe in future the standardised VAPID based Push), from the mobile interface if available, or from the device itself which is limited by background execution restrictions.

Andrew Lipscomb
  • 936
  • 8
  • 19