Function App calling Notification Hub with Android Topic / Tags - azure-mobile-services

Does anyone know how to send topic or tag with Andorid payload?
With Apns it's easy:
{"aps":{"alert":"msg","badge":1,"sound":"tap.aif","tag":"918928"}}
Any help is appreciated...

The Android platform expects the payload in the form:
{"data":{"message":"test message"}}
We also could get more info about how to send notification hub from Azure official tutorials.
About how to bind notification hub to azure function please refer to this tutorials.

Related

Need assistance on integrating servicenow to MS Teams

Can anyone please let me know the Microsoft Team API where i can POST a message from Servicenow to Microsoft Team
Please take a look at Proactive messaging for bots and Connectors documentation. Connectors can be used to send message only in a channel.
You can also use Create chatMessage in a channel Graph API which creates a new chatMessage in the specified channel.

Using outlook rest notifications api

I created a function in azure functions that is triggered by http request.
Also I have a web app that used for clients to subscribe to my app.
My app and web app is written in .net.
My goal is to set a subscription button in the web app, so when the user subscribe it would allow me to get push notifications about new mail in his outlook inbox folder and send http requests to my azure function that includes the content of the newly received mail.
I read the doc about this API but couldnt understand it and what should I do to get my goal. Also I didn't find any examples for this.
How can I achieve my goal?
There are two options you can try for your scenario :
Option 1: you can create Function APP with Outlook connector and Microsoft flow ( you can listen for new emails using Office 365 API -> "When New Email arrives" and also can be posted the payload using http trigger function
Option 2:
Creating Push notification in your app when you received, you can push the payload to
Azure by a wehbook using Webjobs or Functions
Documentation Outlook REST API V2.0 : Push Notification
To play around with REST API use this URL :https://oauthplay.azurewebsites.net
good luck

Swift Firebase Send Push Notification [duplicate]

This question already has answers here:
Is it possible to send PushNotifications, using Firebase Cloud Messaging (FCM) to special UDID, directly from device?
(6 answers)
Closed 6 years ago.
I was wondering how I could send a push notification by code from my app, via Firebase? I am only able to send a push notification from my Firebase Notification-console as of right now, but I would like to figure out how to send one programmatically. Any ideas on where I can find more info on this? Please point me in the right direction! I tried to check out a project on GitHub by Firebase (quickstart), but I have to say that including that project, it's very little information on this. I was lucky to find a tutorial on YouTube that at least allowed me to teach myself how to use remote notifications.
Thanks in advance!
You can, Firebase (formally Cloud Messaging) provides REST API to send push notifications, checkout the following documentation,
https://firebase.google.com/docs/cloud-messaging/downstream
https://firebase.google.com/docs/cloud-messaging/server
You have to construct the payload, generate Server API Key from Firebase Console and send http request to Firebase endpoint (https://fcm.googleapis.com/fcm/send)
And if you are looking for any library, here is the one which works
http://www.java2s.com/Code/Jar/g/Downloadgcmserverjar.htm
it will send push to GCM server, but it works with Firebase too(we are currently using it)
i don't currently find any official SDK provided by firebase to send push notifications

Send notification through Azure Notification Hub in new Portal

How to use 'test send' tile/option in the Azure Notification hub. Where to add the Registration ID/ Token ID in the Portal. How to use it. Please suggest me some articles on this. Here is the exact picture
I just started using Notification hub. I don't prior experience on push notifications or azure notification service.
When you register device on azure push notification service - it creates new entity on its notification hub.
This entity has 3 main fields: registrationId, deviceTokens and tags.
Test send works with tokens. Tokens are just like tags in Instagram or Stackoverflow. You can pass there something like user name and send on all user devices by one send.
Also you can pass device token in tag, or regId. So you can test send test notification on selected device.
P.S. Best way to work with azure services: Visual Studio. You can connect your azure hub, watch the list of your registered devices (regId, deviceToken, tokens and expiration dates(you can not do it in azure console)) (also you can use test send by VS)

Bluemix Mobile Push Notification Service, how to register by consumerId

When send push notification messages, consumerIds can be specified as target. But when register the device, I don't see where to supply the consumerId in the SDK doc.
Register iOS Devices
Register Android Devices
Can you let me know how to register with the consumerId?
Thanks,
Jen
Currently there is no way to register a consumerId / userId through the Android and iOS SDKs. This is a feature that existed prior but was removed due to security issues when dealing with the public facing REST APIs. It is my understanding that work is being done to reintroduce the functionality but I know nothing more than that.
That said it is possible to recreate the functionality through the REST API (https://mobile.ng.bluemix.net/imfpushrestapidocs/#!/devices/put_apps_applicationId_devices_deviceId)
In short what you would need to do it register the device normally through iOS or Android, then execute the REST GET devices/{deviceId} using the deviceId obtained at the time of registration. From there you could copy off the data, insert your desired consumerId and then execute PUT devices/{deviceId} using that data to update the device registration with the new consumerId.
The answer I posted here goes over that in a little more detail
How to register a userId to Bluemix Push Notifications services?
Again unfortunately it's pretty convuluted to execute at this point while we wait on the native SDKs to reacquire the functionality. In some cases it may be wiser to just create your own mapping of deviceIds to consumerIds and use deviceIds as your push parameter.
Have you check this documentation of the rest API for IBM Push Notification?
https://mobile.ng.bluemix.net/mbaas-api/?cm_mc_uid=70457747682413998998889&cm_mc_sid_50200000=1456154344#!/push/sendMessage_post_21
There's optional parameters for consummerIds and deviceIds.
There's also this more complex API documentation of IBMPushService:
https://mobile.ng.bluemix.net/mbaas-api/docs/JavaScript/IBMPushService.html?cm_mc_uid=70457747682413998998889&cm_mc_sid_50200000=1456154344