Push Notifications

I know that its not really possible with any existing built in functionality to display a push notification on a mobile device with the Perspective app.

However has anyone else done push notifications in any way outside of SMS? I have a client that needs lock screen notifications, but doesn’t want to get a phone number for all 300 of their devices.

I have tried doing something like targeting an MS teams message to a group, but there is no way for me to target that message to a specific user. I have contemplated trying to do the same thing with whats app, but that is quite a bit more work than an incoming web hook on teams.

I am willing to delve into the realm of “theoretically possible” with stuff like building a simple android app to track and display these beside Ignition, but I would just need more information.

I really appreciate anyone’s thoughts!

1 Like

This would be relatively easy on the Ignition side of things… just implementing an AlarmNotificationProfile type for it.

The harder part would be building the app to receive it, building the cloud component, handling registration/opt-in for every device, etc…

1 Like

I guess my question is could there be a way to opt the perspective app into notification registration from a server we provide? I think an end user would be responsible for providing the notification server, but this would require you guys to add that capability into the existing app.

Theoretically one could build a module that provides said notification server

I think the limitation there isn’t the ability to create a module for the notification triggering aspect, but the inability to bolt that into the existing app without having to provide a separate custom native app

Note: I realize I said making an app is an option, but that’s obviously a last choice

As I understand it, this just isn’t something Android/iOS support. I believe you have to register, in a ‘static’ resource bundle/manifest/whatever, what the ‘source’ of any notifications for your app will be. There’s no way to dynamically configure it once the app is compiled.

Disclaimer: I could be completely wrong, but that’s not too uncommon.

1 Like

There we go, that could very well be the limitation I am looking for/need to know!

I guess my next question, if the answer is providing a custom android app that displays the page (similar to electron): would that immediately break any functionality for things that control the device? I.e. vibrate, camera, etc. or is there a way that perspective can communicate with the wrapper app? Obviously it’s technically possible as you guys do it, but is this implemented in some under the hood way that’s not possible to replicate?

There’s a non-trivial amount of engineering effort involved in the mobile device session registration that you’d have to reverse engineer (which would be decidedly not supported by IA). I would call it doable, but far from easy.

1 Like

I appreciate all of the clarifications from both of you!

Who knows, maybe one day it’s a viable product for Inductive to support a subscription notification service for just this. As it seems that’s really the only true way to make it happen, but could definitely see it being work on your end to not only implement, but support.

Sounds possible on the Apple side of things with Apple’s APNs service.

Apple Push Notification service (APNs) is the centerpiece of the remote notifications feature. It is a robust, secure, and highly efficient service for app developers to propagate information to iOS (and, indirectly, watchOS), tvOS, and macOS devices.

For a provider to communicate with APNs, it must employ a valid authentication key certificate (for token-based connection trust) or SSL certificate (for certificate-based connection trust). You obtain either of these certificates from your online developer account, as explained in “Configure push notifications” in Xcode Help. To choose between the two certificate types, read Provider-to-APNs Connection Trust. Whichever certificate type you choose, provider connection trust is prerequisite to a provider sending push notification requests to APNs.

Device token trust works end-to-end for each remote notification. It ensures that notifications are routed only between the correct start (provider) and end (device) points.

A device token is an opaque NSData instance that contains a unique identifier assigned by Apple to a specific app on a specific device. Only APNs can decode and read the contents of a device token. Each app instance receives its unique device token when it registers with APNs, and must then forward the token to its provider, as described in Configuring Remote Notification Support. The provider must include the device token in each push notification request that targets the associated device; APNs uses the device token to ensure the notification is delivered only to the unique app-device combination for which it is intended.
Local and Remote Notification Programming Guide: APNs Overview

There’s also this (MIT Licensed)?

What if we had an Ignition APNs module that handled registration and notification? It would require one to have an Apple developer account to obtain a valid key/certificate, but I wouldn’t think that would be overly difficult for an integrator/end user to manage. Then in the Perspective app, you could register device tokens with the APNs module on the Gateway after connection?

I’m sure like anything else the devil is in the details, but if you’re going to offer applications for mobile devices, people are never going to stop asking for push-notification support.

2 Likes

I think we’re eventually going to add push notification support. It’s been on our radar for a long time. I doubt we’ll open Perspective mobile apps up, if that’s even possible, for you to BYO push notification into the app.

6 Likes

You could either integrate with GCM and APNs directly, or utilize something like OneSignal for cross platform integration into those platforms. Would still need to compile the native apps with specific keys, but an individual company could roll this out pretty easily.

2 Likes

I use Gotify. The server is super easy to install, and then hook the Android application to it. Then send messages to it from Ignition.

You can also use a slew of other push notification services as well in the same exact manner.

3 Likes

Do you currently handle push notification in this way with ignition?

Yes. Though, Gotify only has an android app I believe. If you need to use iPhone/ios, you may need to look at a service such as Pushover or Pushbullet.

2 Likes

Thanks Ishirley
Did you insall Gotify in local machine (win os) ?
Did Gotify support multiple client push as each client has to get different tokken?

@kgamble,
I use https://pushover.net/ and it just work. on mobile and even desktop notification. No subscription. I guess https://pushed.co/ should work as well.

1 Like

It works no differently than the cloud push notification services. Each user gets an ID which you can easily store in the user’s table. Then you just loop through the column in the table for whatever users you need to send to and send the message to each user. I installed the Gotify server on Linux in a container. Again, though, I think Gotify only has an android app to receive the notification. You’ll need to check if they have an iOS app. If not, you’ll need to do the same process with either pushover or Pushbullet, or etc.

1 Like

I’ll definitely be trying these as well as the ones @lshirley mentioned. I didn’t know there were general push notification services like this!

collection for PUshNotification provider

Link

Hi Ishirley,
i setuped Gotify on the same machine which ignition run. I am able to get Pushnotification in chrome which in local machine.
I have different client configured in Gotify , How i can get a push notification on other clients ? Only one client which in same machine able to get notification.
How i can run other client on different PC which had chrome.

import system
contentType ="application/json"
url="http://localhost:80/message?token=AcdO9Gobov0dB7r" 
json={
    "message": "First Test ",
    "priority": 1,
    "title": "Gotify Test 1"
}
postData = system.util.jsonEncode(json)
result=system.net.httpPost(url,contentType,postData)
1 Like