Is it possible to send Toast and Tile notifications together in Windows Phone? I want to receive Toast as well as Tile notification at the same time on my phone.
This here suggests it's possible, but the documentation says otherwise:
Form the message for the appropriate notification type. The following sections describe the message formats for toast, Tile, and raw notification messages. You can post only one notification type (toast, Tile, or raw) to the server at a time. If you want to send multiple notification types to the same client device at the same time, you must create separate POST messages for each notification type.
Related
I would like to send marketing push notifications that can go to the Notification Center and topics (such as breaking news) that could be very frequent in my case only as badge (I.e not persistent and only visible once the user is in the home screen but not on lock screen)
So the typical permission request for notification includes
[.alert, .sound, .badge]
But there is no method or place that I can found to process the incoming notification and tell it to ONLY show as badge. Is it even possible to do so?
This is for Swift 4and iOS min sdk 10.
Send it as a silent notification, using the content-available key, and add a Notification Service Extension that updates the badge for you.
I had read that not to add notification node in the body of the request, and I tried to send without notification node but it seems that the message not received but when I add the notification node it work well
So, what is the difference notification node and data node in Firebase cloud messaging?
{
"to": "/topics/some_topic",
"data": {
"key_1" : "some_value",
"key_2" : "some_value"
},
"notification":{
"body" : "some_message"
}
}
Is there any link to doc I can read ?
The data node is used for sending notification if the application is on the background/foreground and in some phones if it is also killed.
The notification node is used for sending notification if the application is on the foreground. If it is in the background you wont receive the notification.
The best option I found is to use data node alone.
Also it is explained very well in this link: The FCM messages types
Notification node (a.k.a Notification messages)
When sent, this will receive a notification on the device, regardless of whether the app is in foreground/background/terminated state, but the notification will be shown only when the app is not in foreground. You can bundle a data payload with this of upto 4 KB. The upside is that you do not have to worry about generating a notification every time, the libraries take care of that. The downside is that there is no way not to show the notifications, for eg when you want to do something silently.
Data node (a.k.a Data messages)
When sent, this will fire up all the same callbacks as a normal notification node would, the only difference being that a notification won't pop up on its own, you are the master of your own callback! This is useful for when you want to do something silently, like refresh the cache, update the database etc. As a data node will have the data payload and will fire up a callback at any state of the app, you can generate a notification on your own and fire it up. This gives you the freedom to design your notification however you want!
The issue is that I want to send push notifications to iOS and I am able to do it via the token to the specific device and everything is working fine but the issue I am facing is that I only get one one notification if my phone is not connected to internet, when I connect it back to the internet.
Like If I send 5 different notifications to a token via POST Request using Postman and I had turned off my Mobile phone Data and my Wifi and after sometime I turn on any one of them then I only receive the last notification which I request out of the 5.
You should read about 'non-collapsible' messages in the Firebase documentation if you expect to get all messages.
https://firebase.google.com/docs/cloud-messaging/concept-options?authuser=1 clearly states
Except for notification messages, all messages are non-collapsible by default.
Maybe you're sending collapsible messages. And the FCM documentation states that:
If the device is connected but in Doze, a low priority message is
stored by FCM until the device is out of Doze. And that's where the
collapse_key flag plays a role: if there is already a message with the
same collapse key (and registration token) stored and waiting for
delivery, the old message is discarded and the new message takes its
place (that is, the old message is collapsed by the new one). However,
if the collapse key is not set, both the new and old messages are
stored for future delivery.
You can try sending non-collapsible messages.
i'm trying to implement push notification for our Windows Phone apps. We have about 40, 50 games on Mobile Phones, each game we have about ~400.000 users on their device.
I read some tutorial about push notification for Windows Phone such as this (http://joashpereira.com/blog/2015/03/18/php-script-to-send-android-ios-and-windwos-phone-push-notification/), but there's a problem is that we can only send push notification to one device per request. If i use this method, our program will process very very slow.
It's not look like Android or IOS, where i can send notification to ~1000 devices per request. That's pretty easier.
Anyone know how i can deal with this problem? Pls Help, thanks.
[Answer to a comment in the question]
The send method of the NotificationHub returns a NotificationOutcome object. This object contains several informations. Also a TrackingId which is a unique identifier which has been generated by the Notification Hub. But at the moment you have no possibility (as far as I know) to get more informations.
You can use the TrackingId to contact the azure-support, when you have problems or questions.
The problem is, that azure don't send the notifications directly to the devices. Azure just sends it to the device specific notification server (APNS, GCM, MPNS), and this server decide about the time to send the notificaiton
Look at this page at the end (section 'Debug failed notifications/ Review notification outcome' or 'Review telemetry') for more informations.
I'm wondering if it is possible to send notification from handheld (android phone) to wear device to open Activity on wear device? What I want to do is as following.
So far, I checked the following documents, but it's different from what I want to do.
Adding Wearable Features to Notifications
What is described here is sending notification from phone to wear, then open activity on the phone (I want to open activity on the wear)
Create Custom Notifications
What is described here is sending notification from wear to wear, then open activity on the wear (I want to send notification from phone to wear)
Any ideas?
The pattern to use for this is:
Create a DataItem on the mobile. It will be synced to the connected wearable automatically.
On the wearable, implement a WearableListenerService and listen for onDataChanged events.
When you receive a DataItem, create a notification (with the data sent in the DataItem) and send it locally (i.e. on the wearable). Use setContentIntent() on the notification to specify a pending intent that will launch your wearable activity.
Don't forget to also provide an intent that is fired when the user dismisses the notification on the wearable, so that the DataItem can be removed. Otherwise, you will not receive any update events.
I've created a sample project that shows all of this in action.
Check out this question if the onDataChanged method is not getting called.
I think in most cases it would be better to include your app activity inside the notification.
For example, instead of the "Open" button in your notification, you could use setDisplayIntent(notificationPendingIntent) to display an activity as part of the notification as described here:
http://developer.android.com/training/wearables/apps/layouts.html
This gives you a best of both worlds situation between having an app and a notification.