As far as I know, Ios and Android gcm are able to open an application when a push notification event arrives.
For wp7, I only find samples on how to update tiles or display a message. But I need to display a bitmap in fullscreen.
Is there a way to open my app when I send a push notification ?
Thanks in advance for your help.
There is no way you can launch anything via a push notification on Windows Phone. Raw, toast and tile are the only acceptable types, none of which is able to invoke code execution outside the pre-defined boundaries (e.g. launch the app when the toast is tapped).
Since you are displaying an image, your best bet would be focusing on the tile updating mechanism. Remember, however, that there are no guarantees that the user will see the tile (unless pinned), or keep it on the home screen permanently.
If you send a Toast notification using the Notification mechanism, then tapping on the Toast will launch the application, you can then specify a page to navigate to within your application.
Take a look at the following for more information :
http://msdn.microsoft.com/en-us/library/hh202967(v=vs.92).aspx
Related
Summary
I want to handle push notifications from a background-service (or an application shown as a tray icon) and show it as a native Notification in the Action Center (priority: Windows, but if it's cross platform, it works aswell).
The tray icon is optional and nice-to-have. The important thing is the application should run in the background and show notifications.
Question
Can you suggest a way to show a native (windows) notification while the application is running in the background? Maybe an overview of the current (read: not deprecated) ways of achieving this?
Details
There seem to be a thousand ways how to handle notifications in Windows and none seem to work flawlessly. UWP doesn't support tray icons (you have to do a hacky-thing with a WinForms application or WPF), Electron seems to work only when you have it as a shortcut to the Start Menu, WinForms is ugly to get to show notifications in the Action Center.
Can you suggest a way of doing this? Preferably without having to submit the application to the Store.
So far, it seems I will have to deploy a Notification Service on Azure, but I am not sure my application can handle these notifications while it is in the background.
JetBrains Toolbox provides a similar approach I want to accomplish: It is in the tray and can send notifications (like when I search for an update).
Toast notification in Windows 10 is behaving strange. It does not stay in the action center even if user has not taken any actions yet. This behavior is with custom notification and generic both. Toast notification is generated using a Windows desktop application not using a universal window.
As answered here :
Win32 apps need to set up a COM server in order to have toasts persisted in Action Center: http://blogs.msdn.com/b/tiles_and_toasts/archive/2015/10/15/quickstart-handling-toast-activations-from-win32-apps-in-windows-10.aspx
You can go on https://github.com/WindowsNotifications/desktop-toasts to view some working samples in C++ and C#.
Can I use All notification in single Windows Phone App (Tile , Toast and raw )? If yes then how ? Is there any example or link which uses all these three notification?
I have checked these links
http://msdn.microsoft.com/library/windows/apps/hh202967(v=vs.105).aspx
http://msdn.microsoft.com/library/windows/apps/hh202977(v=vs.105).aspx
and also what is different between Toast and raw notification.?
Thank You
Yes, you definitely can use all three types of push notifications. Why not? You just need to union the needed code from toast, tile and raw notifications articles. The code is pretty much the same except a few strings. You can merge it in one and you will get the app that uses all 3 types.
The difference between Toast and Raw is that when app receives Toast message - it shows a 'toast' (Top-aligned popup with app icon and some text above the accent color). As for wp8 - toast only shows itself when app is not active (not pretty sure about wp8.1). You can also check whether toast came to your app from code and do some more actions. As for Raw message - you just can subscribe to receive it and make some actions manually in your code - show MessageBox, refresh some data and whatever. So it seems to me that Toast notification is improved version of Raw notification.
I am looking for a way to show the number of unread articles from an RSS feed on a live tile on Windows Phone. How can I do that? I know that I can use background tasks, but I want to use them effectively, so I don't drain the battery of the phone by checking the feed over and over again. Also, I want to reset that number when I open the app.
There are 2 ways of updating the tiles.
From within the app (or background agent)
From a remote service, via push notifications
The method with the least impact on the battery is to send push notifications when there is a new article. This does require a backend service capable of identifying when new content is posted and sending the push notifications though.
If you want to do it all on the device using background agents, the important thing is to remember to not pull down all the content each time. If you have control over the backend then add the ability to return how many new articles there are. If not, only pull down the feed if necessary. Look at the If-Modified-Since header for one way to do this.
It's very easy to reset/clear the tile contents from within the app when launched. When you navigate forwards into the main page is normally the best time.
I need to port an Android app which has a widget to WP8.
In Android the widget shows a countdown which is updated in the background automatically - even when the user has quit the app.The countdown starts at a certain pre-programmed time and just counts down - all donw without the user having to start the app in Android.
Is there some kind of similar functionality on WP8 with the tiles?
The app does not interact with internet and does not receive any external messages like email that can cuase the countdown to work. It needs to all happen automatically.
This is not possible in WP8 (or WP7).
At best you can update your app's tile on the homescreen once every half hour (best-case!). It sounds like you want to update more frequently than that.