I know this isn't directly programming related, but couldn't find another StackExchange site to post this on. I'm using a minimally customizable template to create a few dozen mobile apps (under one publisher) using PhoneGap, and need to push notification messages to all users across the following platforms:
Android
iOS
Windows Phone
Blackberry OS 7+
We have a custom backend powered by ASP.NET MVC that needs to send notifications to mobile app users based on various events that are raised - such as when a certain date is reached send a certain message, or for announcements, as well as to send notifications about special offers.
I'm unsure if a full-blown push notification service like PushWhoosh or PubNub subscriptions are worth investing in or if we should rather opt for each platform's own service such as Apple's APNS and Android's GCM (not too sure what Blackberry services are available for push messaging to BB OS 7+).
I would really appreciate if someone could shed a little light on this matter and will tremendously help my decision making process.
Many thanks!
After finding a similar thread here on SO (Custom Apple Push Notification Server vs Urban Airship and likings), I've decided that it would be best to instead leverage each platform's native push service:
Apple Push Notification Service (APNS): here
Google Cloud Messaging (GCM): here
Microsoft Push Notification Service (MPNS): here and here
BlackBerry Push Access Protocol (PAP): here and here
Alternatively, use the open source PushSharp Library.
Hope this helps someone!
I'd suggest you try out those at QuickBlox (it's free of charge).
Here's the guide for iOS: http://quickblox.com/developers/SimpleSample-messages_users-ios
And the Android one: http://quickblox.com/developers/SimpleSample-messages_users-android
Not sure about Windows Phone and Blackberry though.
IBM MobileFirst supports
APNS / Push notifications in native iOS applications
GCM / Push notifications in native Android applications
MPNS / Push notifications in native Windows Phone applications
Push notifications in hybrid applications
Related
so i have a web app and a mobile app, the web app works fine with signalR and SQL, and i'm trying to create an ionic mobile app using the same backend from the web app, so i am a little limited to using signalR as well.
in the web app, i have certain triggers set up to fire popup notifications when certain events occur, and it works great with signalR in the webapp.
the problem is : due to some restrictions i have to use ionic,and i've been searching for 3 days on a way to implement push notifications without having to resort to FCM but i haven't reached anything.
is there a way to do this with ionic 3? to implement push notifications with signalR instead of FCM?
I'm not sure I completely understand your question, but let me see if I can start a dialog.
Ultimately, for push notification, you have to contact both APNS (Apple push notification server) and GCM (Google Cloud Messaging) to enact push notifications on both ios and android phones. So, that means that you can contact the servers directly from your app. (kind of a pain for ios, not so much for android) or you can use a middle man such as:
FCM
Onesignal: https://onesignal.com/
Amazon Simple Notification Service: https://aws.amazon.com/sns/
or a bunch of others: http://www.businessofapps.com/guide/push-notifications/
I'm not familiar with signalR per se... but I'm very familiar with push notification. You can do everything you need with http api calls from signalR, but the certification requirements for the GCM and APNS servers are difficult to keep up on the app itself. (hence so many businesses that will do it for you.)
Although, I guess one thing I'm a little confused about exactly who you are pushing to... a web service? a phone? (I'm assuming a phone since you mentioned FCM)
Edit after first comment:
So, the answer (as I understand your question) is that you cannot go from signalR to a mobile device directly without using something like FCM (which I recommend) or Onesignal.
For Why... Let's start with a diagram:
You'll notice the bidirectional flow from the cloud marked APNS, GCM and FCM between the device. That means that only way to get to the phone via push notification is via APNS, and FCM, which you'll have to do through a push notification service.... such as FCM
Before any confusion sets in, let me point out some important point:
1. FCM and GCM are pretty much synonymous. FCM is the updated version of GCM that added some functionality. more info here
FCM is both a push notification service and the messaging service. That is to say that FCM provides both the services of the gray box and the gray cloud below. As far as I know, there is nothing similar in the ios world that does both. FCM allows you to pass along messages to both android and ios phones (via FCM and APNS)
So, you don't HAVE to go through FCM to do push notifications, but even if you picked OneSignal, they will still communicate with FCM to actually send out the push notification to the phones themselves.
You're doing the right thing by starting in the android world. Push notification is significantly easier there than in ios. (The difficulty lies in the certification process which is easy after you get to know it... but it was tough for me to understand at first)
In short, this is what I would recommend:
1. use ionic native push to communicate with FCM as a push notification service (the gray box)
2. setup FCM so that it can communicate with the APNS servers as well when the time comes.
for ionic native, I'd use their github site for documentation (I'm sure you've already been there) https://github.com/phonegap/phonegap-plugin-push
For setting up FCM, I'd recommend the documentation at the firebase website: https://firebase.google.com/docs/cloud-messaging/
Note: When using firebase products in ionic... choose "web" for all documentations. For example, despite the fact that you're planning on using ios and android phones, you'd pick "get started for web" at this link:
https://firebase.google.com/docs/
Being a Java developer, i am super excited to use codenameone for an app that I am planning to write from scratch. But would like to know if codenameone supports activity detection which uses CMMotionActivity in case of ios or Google Play Services ActivityRecognition API in case of android ?
Particularly, my app would like to receive events when the user is stationary, walking, running, cycling, driving/automotive etc. Also, if i can fine tune the battery usage settings in case of location services subscription as provided by Google play services location apis, that would be great.
I hope i wont get disappointed. I was planning to learn codenameone and use it in my app only if these above features are available
I'm afraid they aren't available out of the box. However, Codename One is very flexible and you can use native interfaces to expose these features by invoking native code.
A few months back I saw that Safari 7 was allowing push notification and it seemed like a very useful tool except every example of it that i've seen is focused on desktop browsing, not mobile.
Do the Safari push notifications work on mobile and if not is there plans to release this to Safari mobile in the near future?
I guess it is just for OS X, at least for now. I received a mail from Apple broadcasting this: https://developer.apple.com/notifications/safari-push-notifications/.
I am also waiting for web-based push notification on iOS. But it seems Apple is pursuing a native-first strategy on iOS platform, giving native apps much more privilege than mobile web.
[Updated] Web Push Notifications depend on "Service Workers" which are "Supported" in WebKit (Mobile Safari), but the state of Push Notifications is unclear. – Kudos to Chris Talman for the update
https://webkit.org/status/#specification-service-workers
https://w3c.github.io/ServiceWorker/
Since this was 2 years ago, I no longer think this is of service, but Apple has no plan to expand to mobile nor has any plan for push notifications on mobile. I have been on the Apple developer site and have found that there is no way for push notifications on IOS. However, Users using Google Chrome can use push notifications on Android using the Push API (https://developers.google.com/web/updates/2015/03/push-notifications-on-the-open-web?hl=en)
Looks like Safari 16 in macOS 13 will support the Notifications API. Details are vague / possibly protected under non-disclosure agreement during the macOS beta.
Source: https://developer.apple.com/documentation/usernotifications/sending_web_push_notifications_in_safari_and_other_browsers
The Safari 16 release notes doesn't make particular mention to iOS/iPadOS 16 & Mobile Safari, however.
Web API
New Features
Added Web Push Notifications support on macOS.
Source: https://developer.apple.com/documentation/safari-release-notes/safari-16-release-notes
Right now there's no way to send push notifications to mobile Safari nor any plan to add it in the future.
However the latest versions of Chrome on Android started to support the push notifications through the Push API, so Apple might want to add push support to iOS to avoid being outdated by Android.
OK, how do push notifications work?
I found a nice tutorial: http://lessons.runrev.com/m/4069/l/59312
I get the concept that the device needs to register with the server but does the app essentially hold an AJAX connection to server or does the server somehow plug into the mobile phone network... ?
There are three essential components when talking about push notifications:
Your server
The providers server
Your mobile device
Your server is the sender. It sends the push notification to the providers server, which in turn sends it to the device. Your device, therefore, is the receiver. (Concluding that you don't have to "plug into the mobile phone network", this is all done by your provider - Google in this case)
Within your mobile application you just register an eventhandler which is fired when you receive a push notification.
Google called this C2DM (Cloud to Device Messaging), now GCM (Google Cloud Messaging) - you can get an introduction inclusive of an architectural overview and demos here at android.com.
To answer your question I know:
Both push notifications services (Apple's and Microsoft's) are using a persistent IP connection for implementing their push notifications functionality.
I think Android works the same way (at least with Android Cloud to Device Messaging (C2DM)). "It uses an existing connection for Google services". http://en.wikipedia.org/wiki/Android_Cloud_to_Device_Messaging_Service
But the answer is closer to AJAX, except I assume it is a simple "http" connection to Google Messaging service from Android, and the OS gets an alert of a new message and relays it back to a program that registered on it to want notifications.
I want to write GAE based application that synchronizes information between computers/phones. Right now I am only querying periodically, which causes delays or requires user to click a button to refresh manually.
With GAE channels, it should be possible to do it this way that a device can be notified when it should refresh. However, since I want it to be a desktop app (not web app), I am wondering if I can write my own client to channel API? Or grab whatever's out there.
Is the protocol documented or are there clients available for anything other than JS?
The only official interface is the Javascript client library. Although you could reverse-engineer how it works, since it's not a documented part of the interface, it could change at any time without notice.
If you're interfacing with Android phones or iPhones, each of them has a 'push' messaging API that you could use (Cloud to Device Messaging for Android, and Push Messaging for iPhone).
There is now a Java implementation for the Channels API. It was just released days ago and is available via git at https://github.com/gvsumasl/jacc. I've also taken the liberty of forking it and providing a mavenized version at https://github.com/hatboyzero/jacc.