Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Send Push notifications to iOS/Android on closed WiFi nework (no internet connection) [closed]

I would like to create an app that users can use in an area/venue where there is NO GSM/3G or any kind of cell reception. We also only provide a closed WiFi network without an internet uplink, so it's a LAN where devices (PC's and Smartphones) can communicate with each other but not with the outside world (don't ask why :)

The users will be instructed to download the app before they come to the venue.

My app needs to be able to receive push notification but of course it cannot reach Apple's APNS or Google cloud messaging services. The app however does register to our central server on the LAN with an IP. (it logs in when the user is connected to the WiFi network and we have the phonenumber that belongs to a registered phone.)

Now my question is: is there a way to send a push notification when an event is triggered and the app needs to wake up without using or connecting to Apple's or Google's online notification services?? E.g. an on premises push notification service that can be used to send a notification to a users phone based on an event that is triggered by our server?
Any suggestions?

Update: Just to clarify, it's a simple VoiP app that connects to our sip server and let's users call each other so it needs to be fairly real time for the two calls to connect. But apparently you can only wake the app up by push notification and therefor need internet.

like image 305
user2542225 Avatar asked Jul 02 '13 10:07

user2542225


People also ask

Do push notifications work without Internet?

So you may be wondering why you would use push notifications instead of SMS when SMS has the highest open rate… From this, you can see that push notifications need the internet to be received, and can be media rich, as opposed to SMS, which doesn't require the internet to be received, and can only include links.

Do push notifications work when app is closed iOS?

Apple does not offer a way to handle a notification that arrives when your app is closed (i.e. when the user has fully quit the application or the OS had decided to kill it while it is in the background). If this happens, the only way to handle the notification is to wait until it is opened by the user.

Do push notifications use Internet?

Web push notifications are notifications that can be sent to a user via desktop web and mobile web.

Can you send mobile push notifications without an app?

Pushed allows you to send real-time notifications without developing your own app to iOs, Android and Desktop devices.


3 Answers

E.g. an on premises push notification service that can be used to send a notification to a users phone based on an event that is triggered by our server?

With respect to Android, the answer is "not really". Your options are:

  • Implement your "push" mechanism in the form of some message queue, where the devices poll looking for messages every so often, or

  • Use a WakeLock and WifiLock to keep the device (and WiFi) powered on constantly, then use something like MQTT for the push message

Either of these will be bad for the battery, though the first one is more configurable in terms of power drain (e.g., if you only check for messages once per hour, it won't be bad).

The reason why GCM can keep the power drain low is because of special hooks for mobile data connections within the OS and chipset, such that the CPU can power down while retaining an open socket connection to the push server, where incoming packets from that server will wake up the device. This is not available for WiFi.

like image 105
CommonsWare Avatar answered Oct 02 '22 21:10

CommonsWare


And for iOS the answer is NO. You cannot push notify a device without utilizing Apple's APNS server. Your only option would be local notifications triggered in some other fashion on the device via WiFi although you would still need to keep the device awake to receive these or perhaps add VOIP service or another compatible service to allow for continuous background processing.

Local Notifications iOS

like image 5
Mark McCorkle Avatar answered Oct 02 '22 22:10

Mark McCorkle


Receiving Voice and Text Communications on a Local Network added in iOS 14

Refer Apple Docs: https://developer.apple.com/documentation/networkextension/local_push_connectivity/receiving_voice_and_text_communications_on_a_local_network

like image 2
name-it Avatar answered Oct 02 '22 20:10

name-it