Server send broadcast event Mobilefirst Platform 8.0? - push-notification

As title I wanna know that does MFP 8.0 support send broadcast event ?
For example : a passenger picked up a trip, he want drivers know about his request. Does MFP 8.0 support simple way to do it ?

Sure. You can use the Push Notifications functionality.
In the MFP console, create a tag called "Broadcast".
In your mobile app's initialization routine, register for that tag (i.e., subscribe to it).
When the business event happens, use the server-side push notification API to send a notification to the tag "Broadcast". This might be an insert to a "Trips" table in your backend database.
All devices that subscribe to that tag will get the notification.
-Paul Horan-
IBM

Related

IBM MobileFirst Platform Event Source Push Notification

Let say user A subscribe event source push notification at device A at 10am and subscribe event source push at device B at 11am without unsubscribe. If my backend send the push message, both devices will receive the push message? I actually just want to send the message to the latest devices user have subscribed. Is there anyway to do this?
Like Idan suggested you can inspect push subscriptions in the database . Susbscriptions have an associated timestamp entry . With this you can determine the latest one for the user.
You can then use WL.Server.notifyDevice(userSubscription, device, options) or WL.Server.notifyDeviceSubscription(deviceSubscription, notificationOptions) to target a specific device.
If the user subscribed to two different event sources then yes, the user will receive notifications in both event sources...
There is no built-in mechanism that will prevent "duplicate" subscriptions (of the same user), so perhaps you could implement some sort of a cron job on your server to inspect the subscriptions table in the database and check that there are no duplicate subscriptions. If a duplicate subscription is found, delete the older one.

Push Notification in woklight

I am not able to get actually how push notification works in worklight.
how to pass my device details for the server after registration with GCM,APNS.
how can I toggle with on/off of push notification within the app.
You need to:
Read both:
Knowledge Center: http://www-01.ibm.com/support/knowledgecenter/SSHS8R_7.0.0/com.ibm.worklight.dev.doc/admin/c_push_notification.html?lang=en
Developer Center: https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-7-0/notifications/
The Worklight/MobileFirst Platform Foundation framework takes care of that for you.
In the case of Event Source-based notifications, a notification can be sent by the userId or other types of identifications. This information is stored automatically in the server's database. On your end, when implementing the adapter logic to send the notifications, you can use various APIs (see the Knowledge Center link above) to decide to whom/how notifications are sent.
Also in Tag-based notifications, you can either auto-subscribe or have the user tap a button to subscribe; this sends the data to the server's database, and again in the adapter logic you can then iterate on this list of users/devices to send the notification(s).
To toggle notifications on and off you can use the subscribe/un-subscribe API methods. Review the developer canter tutorials and their accompanying sample applications.

WorkLight 6.2 - How to check previous notification messages which were sent in WorkLight console?

We are currently using Worklight 6.2 for our project. We are able to successfully send broadcast notifications. However, the basic reporting in the worklight console under the Push Notifications tab does not show any data regarding the broadcast notifications that have been sent. It appears that the reporting is only for notifications where device(s) will subscribe to an event source. Is that correct? Since there is no event source for broadcast notifications, is there no way to get the basic reporting ( # of messages sent, platform, number of subscribed users ) etc. in the worklight console for broadcast notifications?
If additional reporting is needed, is the only way to get it from the notification_proc table (we will not be using BIRT)? and create a custom page for the user or is there any out of the box provision to show more in the worklight console itself
For tag-based notifications (this includes broadcast notifications), there is currently no visual indicator in either Worklight Console (via the Push Notifications tab), or Worklight Operational Analytics Platform.
This information is currently not stored in the database, but this may change in a future release.
Feel free to submit a feature request so that the product managers could take it into account for future releases: https://developer.ibm.com/mobilefirstplatform/help/

Send Parse Push Notifications with ASP.net

I have developed an android application with the Parse push notification service and I can send notification from the Parse website.
How can I send push notifications through my own website using ASP.net? Is there any way?
I checked the Parse documentation but i get confused, I would really appreciate it if someone would help me.
Thanks
I ran into similar confusion. I wasn't even sure how to properly setup the user so that I could send a push notification directly to them. Then I found the following post:
Channels and Targeted Push Notifications
Note the last item under the Channels heading:
Most apps might find it useful to have a channel for each user so that
they can send messages to a user across all their devices and have
users follow others in the app.
So, now I know that I should subscribe each user to a channel that uniquely identifies the user (e.g., the 'bobsmith#foo.org' channel).
After I have subscribed the user to their channel, I can call Parse's REST API via my ASP.NET application. See Sending Pushes in the Parse REST API Developers Guide.
For an ASP.NET/C# example of how to submit a push notification check out this answer.

worklight send push notification for all subscribed users

I have to schedule a downtime in order to do some stuff on the production server. My customer wants me to send a push notification to all the subscribed users in order to notify them by the downtime.
Is that possible? If I want to do it even by code will it be possible?
I'm on worklight 6.0.0.0
Using the Worklight Console you can notify the users of your application taking advantage of the "Active, Notifying" setting. This will allow you to display a notification message on startup telling the customer of scheduled downtime. Even when the downtime occurs you can use the same mechanism and set the application to "disabled" with a notification message stating the application is currently down. Please look at the following documentation for more information:
Displaying a notification message on application startup:
http://pic.dhe.ibm.com/infocenter/wrklight/v6r0m0/index.jsp?topic=%2Fcom.ibm.worklight.help.doc%2Fadmin%2Ft_displaying_a_notification_message_on_app_startup.html
Defining administrator messages from Worklight Console in multiple languages:
http://pic.dhe.ibm.com/infocenter/wrklight/v6r0m0/index.jsp?topic=%2Fcom.ibm.worklight.help.doc%2Fadmin%2Ft_defining_multi-language_admin_notifications.html
Maybe you can use Wl.Server.sendMessage, you just need to send the applicationId and notificationOptions where you can pass only the message to send and this method will be send to all users, of if you want you can pass a kind of target for specify the users
I hope this help you
For more info check these links:
Tutorial: https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-7-1/foundation/notifications/push-notifications-overview/push-notifications-in-hybrid-applications/tag-based-notifications-in-hybrid-applications/
Documentation: http://www-01.ibm.com/support/knowledgecenter/api/content/nl/es/SSZH4A_6.2.0/com.ibm.worklight.apiref.doc/html/refjavascript-server/html/WL.Server.html#sendMessage

Resources