Side effects of setting mutable-content - apple-push-notifications

apns docs says:
mutable-content The notification service app extension flag. If the value is 1, the system passes the notification to your notification service app extension before delivery. Use your extension to modify the notification’s content. See Modifying Content in Newly Delivered Notifications.
Is there any side affect of this if the device does not have a notification service app extension?

Related

Azure bot - show chat notifications in notification bar in cross platform moobile app (Xamarin)

i wanted to show azure's chat bots responses as notifications in the notification bar like PUSH notifications.
I've came across that i need to use xamarin webview to integrate bot in Android app. So, can webview capable of showing chat responses as push notifications ?
Note:-
I'm using Bot Framework SDK V4
and .Net Core
Xamarin for cross platform development
The WebChat control (webview in your questions) is used as a UX display control within your app. Messages from your bot to your app goes through a dedicated channel that has nothing to do with a mobile Push Notification. So in short, the answer to your question is no, this functionality is currently not supported by the client Webview control (WebChat).
With that said, you can create a custom middleware component for your bot that can send a Push Notification message using Azure Notification Hub. Or you can create custom functionality (sample showing a standard web app) in your bot that sends a push notification. Or your bot can drop a message to a queue and have an Azure Function pick the queue message and send the push notification. Note the last option is an implementation detail.

Get notified about changes in a google calendar

I was wondering, is it possible to set up a Mac OS X app, to get notified when a user makes changes to a Google Calendar. Like what you can do with EKEventStore?
There’s a query method + (id)queryForCalendarListWatchWithObject:(GTLCalendarChannel *) object, but I’m not really sure how you should set up the GTLCalendarChannel object.
Or is the only way, other than polling, to use push notifications?
Thanks in advance.
You can use Google Calendar API which provides push notifications that let you watch for changes to resources. This makes periodic polling unnecessary.
You can use this feature to improve the performance of your application. It allows you to eliminate the extra network and compute costs involved with polling resources to determine if they have changed. Whenever a watched resource changes, the Google Calendar API notifies your application.
To use this API, you need to:
Register the domain of your receiving URL. Before you can set up a push notification channel, you must register the domain for any URLs you plan to use to receive push notification messages.
Set up your receiving URL, or "Webhook" callback receiver. Whenever a watched resource changes, your application will receive a notification message describing the change. The Google Calendar API sends these messages as HTTPS POST requests to the URL you specified as the "address" for this notification channel.
Set up a notification channel for each resource endpoint you want to watch. To request push notifications, you need to set up a notification channel for each resource you want to watch. After your notification channels are set up, the Google Calendar API will inform your application when any watched resource changes.
When a calendar changes, it will notify your app and the app does an API call to get the update. You can use one of the Google API client libraries to utilize push notifications.
Check these documentation and blog about Google Calendar API Push notifications.
Hope this helps!

Handling Toast and Raw Push Notifications

My WP7 app needs to handle different types of push notification. Some of these are only relevant when the app is running but one type serves as a prompt to the user to start the app as well as needing to be handled while the app is running. Hence, when opening the push channel, my code calls BindToShellToast and registers event handlers for when both raw and toast notifications are received:
if (!_pushChannel.IsShellToastBound)
{
_pushChannel.BindToShellToast();
}
_pushChannel.HttpNotificationReceived += new EventHandler<HttpNotificationEventArgs>(pushChannel_HttpNotificationReceived);
_pushChannel.ShellToastNotificationReceived += new EventHandler<NotificationEventArgs>(pushChannel_ShellToastNotificationReceived);
Looking at the certification requirements, it appears that I have to provide a user setting to allow them to enable/disable not only push notifications in general, but also specifically toast notifications. See Additional requirements for specific app types for Windows Phone (requirement 6.2.1)
Since the user could potentially enable general push notifications but disable toast notifications, it seems to me that my server would need to send both a raw and a toast notification for the type that needs to be handled when the app is not running. This would make registering for the ShellToastNotificationReceived event pointless. Is my thinking correct here?
You should store a settings on your server for each registered device naming what type of notification the user allowed.

Windows Phone 7 - Is it possible to add additional key/values to push notifications messages

I'm testing out Windows Phone 7.5 push notifications. I have got the 3 different push types working fine (Toast, Tile and Raw) and am able to send messages from unit tests and a web application without any problems and receive them in my WP application. I want the ability to add extra properties to the push notification and the Raw push type does this perfectly for me and I can add custom key/value pairs or anything else to the push message and extract it on the phone app. I have just found out however that it only works if the application is running and my unit tests fail (suppressed notification status is received in unit test) when the phone application is not running (checked documentation which confirms this too). Is there anyway to add extra properties (key/values) to toast or tile messages or some way I can use raw in another way ? Toast notifications seem limited to a title property and an actual message property but I need to add additional data.
Just wondering if anyone had any suggestions / workarounds ?
The general practice I use is to initially send a raw notification to the device with phone-usable data embedded in the message. If my application is currently running then I can process the contents of the raw message and immediately make use of it on the phone. However if the application is not currently running on the phone you will receive notification from the push servers that the message could not be delievered. If I receive this response I send out a Toast / Tile notification.
With Toast notifications the only parametrisation you have access to is the URI that will launch the application. This is specified with the wp:param node of the message. Eg.
<wp:Notification xmlns:wp="WPNotification">
<wp:Toast>
<wp:Text1>Toast Title</wp:Text1>
<wp:Text2>Toast sub title</wp:Text2>
<wp:Param>/MainPage.xaml?LaunchedFrom=A%20Toast%20Notification</wp:Param>
</wp:Toast>
</wp:Notification>
If the user taps on this toast notification your application will launch and navigate to MainPage.xaml. You can access the querystring passed in via the NavigationContext.QueryString.
Note: The wp:Param node can only be sent to Mango (and up) devices. Additionally the entire contents must be less than 256 characters or you'll receive a PushErrorTypeMessageBadContent error. (Thanks to Ritch Melton for pointing this out). More info available from the Sending Push Notifications for Windows Phone page on MSDN.
As you've discovered, the Microsoft Push Notification Service is very strict in what types of messages you can send and receive. The intent of these push notifications is to provide simple push updates and not large amounts of data. The flexible Raw type seems like it would fit the bill until you discover that:
You can use a raw notification to send information to your application. If your application is not currently running, the raw notification is discarded on the Microsoft Push Notification Service and is not delivered to the device.
However, if you send a toast notification to your application, when the user clicks on the toast the application is started. When your application starts, you should check a service and retrieve the data you are trying to send from a web-service or other remote mechanism.

Using Microsoft Push Notification Service with Window Phone

I am thinking of a simple chat application in Window Phone using Microsoft Push Notification Service.
I read a guide at http://msdn.microsoft.com/en-us/library/hh202967(v=VS.92).aspx which talks about creating a client application that receive toast notification.
This is a first time for me to develop a mobile application so I do not get some part of it.
The question that I have is, is it possible for a client (window phone) to send toast notification directly to other client? I have found below image from the web. It seems that I need to have Cloud Application(probably webserver?) to play with notification service.
Would it be possible to build a Window phone application that directly request to MPNS to send notification to other window phone application? (so from the picture above, '2' will directly point to Microsoft Push Notification Service)
If it is not, what is the reason for that?
There is a good explanation of the push notification service here.
From the above link.
Registration Phase 2: Now that the MPNS known the presence of the
phone on the network, it is required the phone itself provide the Uri
to the Earthquake service. Until this not happen the service doesn't
know there is a phone that need to be notified so it is not able to
provide the notifications. The phone must call a method on the
Earthquake service to provide the Uri that has been answered by the
MPNS. Once the Earthquake service gets this url it can store this
informations somewhere for a later use.
In your case you'll need communication between your devices before any notifications can be sent. This is to know the uri of your phone. A server has to store these uris for all devices registered for notifications. This is why you'll need an application which sends the xml to the MPNS.

Resources