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/
Related
I am developing my first React Native app and are struggling with the proper implementation of push notifications and real time chat. The attached image shows the current layout without chat/notifications.
The client application uses Firebase only for social network authentication (login) and image storage.
Everything else is kept back-end using PHP/MySQL which also communicates with Firebase for session token validation and email authentication (login).
Now i want to implement a real-time chat function and push notifications but are struggling with the proper way of doing it. If i have understood correctly one way could be: Socket.io (for real-time chat using mysql for archive storage) and Onesignal (for push notifications)
Or is there a better way of doing this when using a PHP/MySQL as back-end?
Any ideas or input is greatly appriciated.
I developed an app using codename one,and in that app i need to show notifications to user regarding the app update if update is available in playstore.LocationManger is working on mobiles with version 5 and above,but its not working on tablets.How to work with notifications in android/ios tablets with version using codename one.
First, you have to differenciate local notification (which is launched when app is running or in background) and push notification (which use Google or Apple server).
I suggest you to use a webservice and push notification. For example, when your app launch, request the webservice to send the app version and know the current version on stores. Here, you can deduce if the app can be updated and you can send push notification to alert that an update is avalaible.
Codename One provides an easy-to-use API for push notification.
However, Google Play and ITunes usually alert user that updates are avalaible.
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
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.