Notifications with Firebase from web - firebaseui

I have been working on an Android application and my customer that will use it want to send notifications is there any way to send notifications from a Web UI other than firebase console?

There is currently no public API to send Firebase Notifications. The Firebase Console is the only place for that. We're considering adding an API, which you could then use to build your own web site for your customer.
See How to send firebase notifications to audience via HTTP

Related

Push notification using FCM for web app in Ruby on rails

I have previously worked on push notifications with FCM for android app. From Firebase console i got server key to which my backend program hits when the notification were expected to be delivered. Also I could easily get the device token from the console(on client side) to which the server would send the push messages.
Now in similar way i would like to implement web push notification using FCM. Unfortunately, could not find FCM set up and implementation documentation using ruby. Besides bit confused as to how i can get the device token for web client to whom i would like to send push message/notification. What things do i need to look at and that i am missing?
I have come across web push gem and terms like VAPID keys and service worker but still confused how they work with FCM. If anyone could help me out with what i should be looking at and what i am missing. Thanks for reading this far.
Getting the FCM token for a device is only supported in client-side code. For web applications, see the documentation on getting the registration token. You can then pass the token from the client to Ruby backend, where you can store and use it to send a notification to that specific client.
To send a message to the token from your Ruby code, you can call the FCM REST API, after providing proof that your request is authorized with one of the methods outlined in the docs on authorizing send requests.
If you're having trouble making this work for your use-case, it's more likely that someone can help if you edit your question to show what you tried based on the above information and other existing resources.

Azure Notification Hub to Apple and Android

We build an iOS app using Apple Push Notification feature. We integrated everything the Apple docs told including provisioning profiles etc... A test in development mode worked fine with Apple tools. Same should be in near future with Google, but I´m talking here just about iOS implementation...
Our backend on Azure collects the registration ids from all iOS apps proper. I mean: We are storing the token retrieved from registration directly at Apple services.
Now we want to use Azure to send Push Notifications to all our apps. But I´m confused from reading the Microsoft documentation:
Must my mobile apps register to Apple or to Microsoft with corresponding SDK?
We don't use the MS SDK on app side. We just register at Apple. Can we send Push Notifications to our iOS apps (just simple broadcast to all registered apps) with Azure?
Our backend on Azure collects the registration ids from all iOS apps proper. I mean: We are storing the token retrieved from registration directly at Apple services.
Where are you storing them? You have to store/register the device tokens at your Azure Notification Hub.
Must my mobile apps register to Apple or to Microsoft with corresponding SDK?
Your app has to get a device token from APNS and then register this token at your Azure Notification Hub, so basically you have to do both.
Have a look at the documentation here. On a high level the whole process looks like this:
We don't use the MS SDK on app side.
You don't have to use the SDK, you can use the REST API.

Using Amazon SNS with React Native

Can anyone provide a simple example of using the Amazon SNS service to send and receive Push Notifications under React Native?
I've got the Amazon SNS service setup, and I can publish a message from the website and have it appear on an iPhone – if I manually enter the device token and initiate the publish on the Amazon website. Now I want to automate the process of registering the Push Token in Amazon SNS, and allow the app to Publish a push to the SNS service.
I know that Amazon has a very new project to integrate their SDK into React Native, but I cannot get it working. Support on that repo is spare too, so I'm hoping someone here can help.
Right now what I get is: Undefined is not an object (evaluating 'cognateClient.initWithOptions')
The GitHub issues mention something similar on Android, but obviously that doesn't help with my iOS app.
What I'm looking for is a step-by-step breakdown of how to integrate Amazon's code in to an existing RN app. They don't provide a standard Node package, so I'm struggling to figure out how to get the React Native code and the SDK to play nice with Xcode.
Any suggestions? Thanks!
There's no 'integration' of AWS into the RN app needed. You just need the device token from RN.
Use a package like RNPN (https://github.com/zo0r/react-native-push-notification) in order to get the device token your phone generates. When you have that, make a call to your api, and your api is then responsible to call out to SNS to register that device token as an SNS 'endpoint'.
Translate this pseudo-code into whatever your API is written in: https://docs.aws.amazon.com/sns/latest/dg/mobile-platform-endpoint.html
In short...
RNPN onRegister ->
POST /registerDevice on your api ->
call AWS
createPlatformEndpoint from your api ->
start sending messages from your api
Most likely you'll want to store some relationship from user -> deviceToken+platformEndpoint in your db/data store.
Then you can send notifications from your api. Wrote up how to do that here: https://medium.com/#duhseekoh/send-a-push-notification-using-aws-sns-javascript-sdk-2f117e9c4180
Im using react-native-fcm with Amazon sns, it will register my device token and then we are sending that token to our php solution that then add the device to a subscription on a topic in SNS, passed back to the app is the subscription token and endsub tokens. Then we Push Messages to the topic thru SNS. Works on both iOS and Android.

How to achieve twitter like push notification via AWS SNS?

Is there a way to achieve twitter like push notification via AWS SNS?
SNS send notification to the user when something is happen him or her?
As i know the best way is to create a topic per user.
When user relate event happened,we publish a notification to the topic.
As AWS described the max topic number is 100,000 per account currently.
What if i've 1,000,000 users, it will not work.
Is there a more scalable scheme?
beeth0ven,
SNS supports publishing to a Topic of subscribed device endpoints or direct publishing to individual endpoints. In your case, you'll want to implement direct publishing to each individual endpoint. This allows more control and personal engagement but also means that you'll need to manage those endpoints in your own database and associate each endpoint to a user of your mobile app. Instead of publishing to a TopicArn, you'll publish individual messages to a TargetArn, which is the SNS Platform Endpoint that represents an app and mobile device. TargetArn is also the same call to send an SMS message to an individual phone number.
SNS Publish CLI: (see --target-arn)
http://docs.aws.amazon.com/cli/latest/reference/sns/publish.html
Direct Publishing via the Console:
http://docs.aws.amazon.com/sns/latest/dg/mobile-push-send-directmobile.html

Push Notifications Using Notification Hub and .NET Web API as Backend

I am working on a project where I have implemented web API with asp.net identity to authenticate users. An iPhone app will be accessing this web API in order to perform several tasks like authorization using identity db, subscribe to groups etc.
I am going to publish this web API in windows azure and going to use Azure notification hub for sending the notifications. Now in my iPhone app the user can subscribe to one or more groups to get notified to that group events. i.e A user can subscribe to "Cricket" and "Math" group in order to receive the notifications of that groups. So these groups really becomes Tags for the notification hub.
Now my question is There are two ways to register device to notification hub.
1) using app itself
2) using the web API that I have created.
I want to follow the second approach. I want the users devices to be registered to notification hub through my web API.
How can I achieve that? I didn't found any satisfactory code snippet for this purpose. Can any one provide me better clarification or code snippet on this?
Thanks
you can refer to the following link- http://www.ankitblog.com/2014/11/azure-notificationhub-sending-push.html and http://www.codeproject.com/Tips/845491/Azure-Notificationhub-Sending-Push-Notification-to for details of that. Its fairly simple

Resources