Mulesfot - Create custom notification using CloudHub connector - connector

I tried to use the option "Create Notification" to CloudHub Connector.
I used this guide https://dzone.com/articles/cloudhub-connector-with-mulesoft.
But the notification didntĀ“apper...
I saw the flow... But i think it is correct.enter image description here

Related

Flutter/Firebase - How to get "heads up" notification on Android?

I have a Flutter application using the firebase-messaging plugin for push notifications.
I register firebase like normal on the client, and I send the fcmToken to the server.
Notifications are created via a python server using aiofcm (which uses firebase's XMPP api). They're created like this:
message = aiofcm.Message(
device_token = t2,
notification = {
"title":notification_title,
"body":notification_body,
"sound":"default",
"tag":link
},
data = {
"click_action": "FLUTTER_NOTIFICATION_CLICK"
},
priority=aiofcm.PRIORITY_HIGH
)
await fcm.send_message(message)
On iOS, notifications pop-up at the top of the screen.
On Android, only the icon shows up in the notification tray - not any of the notification content. This is tested on a Pixel 3 and a OnePlus 6, both running Android P.
Ideally, I would like the notification to be "heads-up" style like this:
Before I was able to accomplish this using data messages and creating the notification programmatically in native android, however I would like to avoid that if possible since data messages don't get delivered on Android if the app is terminated.
To Get heads-up - Notification - Kindly set "alert: true"
Example :
notification = {
"title":notification_title,
"body":notification_body,
"sound":"default",
"alert" : true
"tag":link
},
For heads up notification you will need to use flutter_local_notifications Plugin. It is even recommended in FlutterFire official documentation for notification to show notification in foreground (background notification also supported ofcourse!) and it shows heads up notification by default.
You should check out the firebase.flutter.dev docs it shows how to do this easily with the help of flutter_local_notifiation
you can use background fetch and local notification package for background app running.

Can I add elements to the aps payload sent by the Bluemix IBM Push Notifications service?

I'm successfully using Bluemix Push to send notifications via the REST interface to an iOS app with a simple string alert message. That works fine.
Now I would like to send a more complex message where alert is a dictionary and has a sibling "category" element per The Remote Notification Payload.
Is this possible with Bluemix Push? Whenever I try to deviate from the basic structure, I get "Bad Request - Invalid JSON".
After much head-scratching, I finally picked up a hint from https://www.ng.bluemix.net/docs/services/mobilepush/t_advanced_notifications.html#t_push_badge_sound_payload and figured out that since the category field is unique to APNS, what I needed to send is
"settings" : {
"apns" : {
"category" : "myCategory"
}
#DSchultz_mo I was having issues to find the documentation but I finally found it, so if you go to https://mobile.ng.bluemix.net/imfpushrestapidocs/#/ you can use swagger to register your device and send notification and the magic button is in model there is more details for sendMessageBody

Firebase (Firechat) "Route not found." error

I have been trying to use the firebase fire chat, it works using the default demo url (http://firechat.firebaseapp.com). However, as soon as I change it to my URL it does not work, even though I have enabled twitter login, and I have twitter authentication working on another firebase app. The error message I get is the following:
{"error":{"code":"ROUTE_NOT_FOUND","message":"Route not found."}}
Any idea?
source: https://github.com/firebase/firechat
The twitter callback url for your app should be:
https://auth.firebase.com/v2/your-firebase-app-name/auth/twitter/callback
I found the answer, in the Twitter app settings, the following option was ticked. So, I untucked it and it is now working
Enable Callback Locking (It is recommended to enable callback locking to ensure apps cannot overwrite the callback url)
you need to set Callback URL in https://apps.twitter.com/app/xxxxxx/settingsfor example, https://auth.firebase.com/v2/xxxxxxx/auth/twitter/callback

Wordpress WP-GCM plugin does not sending new post notification

In Wordpress - WP-GCM plugin does not sending any push notification when publishing a new post or updating a previous one. It sending only message. Anyone please provide solution for this..
This is because the app is configured only to receive "message" and send a notification. The tag for when publishing a new post is "new_post" and for updating a previous one is "update" (Ref: Wordpress GCM documentation). You have to configure the app to receive notifications for this.
Currently it will look something like this in android:
newms = extras.getString("message").toString();
sendNotification(newms);
You have to add something like:
newms = extras.getString("new_post").toString();
newms = extras.getString("update").toString();
sendNotification(newms);

Unable to run pushtest Apigee sample

I am trying to run the pushtest sample that ships with the iOS SDK. In the .m file I have replaced the org name, app name and notifier name( which I have named 'apple'). I have the provisioning set up for my iPad. When I run the code, I don't see any window asking me to allow push notifications. On clicking the push to this device, the terminal spits out this error:
2014-01-30 14:04:20.525 Push Test[2970:60b] displaying alert. title: Error, message: {"error":"unauthorized","timestamp":1391119457656,"duration":0,"exception":"org.apache.shiro.authz.UnauthorizedException","error_description":"Subject does not have permission [applications:post:ed031740-7e90-11e3-a906-25e89414fcd7:/notifications]"}
I believe this is because the app has not obtained push permission, however, the alert window asking for this was not presented in the first case. How can I fix this?
"error":"unauthorized"`
This is an indication that your request requires authentication and you're not authorized to access the endpoint.
Push notifications out of the box require authentication - either an access_token (recommended) or client_id/secret. Try including the access_token in your header (instructions here).
If you want to disable authentication, you can add the GUEST role to /notifications (instructions here).
You need to give permissions to your application role:
curl -X POST "https://api.usergrid.com///roles/ -d '{"name":"nameforrole","title":"titleforrole","permission" : "GET,PUT,POST,DELETE:/users/me/**"}'

Resources