Notification in Windows Phone 8 - 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.

Related

UWP Notifications from Background Service

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).

Query toast notifications on WP8.1

My WP8.1 App creates toast notifications that will appear - like SMSs - in the Notification center of the Windows Phone (this part works like a charm).
In one precise scenario, I would like to limit the number of notifications my app can have in the Notification Center at a given time:
"if a user has 3 notifications displayed, he cannot add another until he clears one of them".
Any idea how to hook into the notification center to know its state?
Thanks!

How can I show number of unread articles on a live tile on Windows Phone?

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.

Wp7 push notification to launch my app

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

How to keep you Windows Phone 7.5 application on top

we are creating a windows Phone 7.5 application, this application is developed for specific purpose for company field employes, phones will contain the data sim. No communication allowed like making a phone call, sending sms or chekcing and repling email etc. This application will receive the Push Notifications from our application in the head office.
Is there any way that we can keep this application always on top, regardless what button is pressed by the user we want this application to always stay on top so what ever the notification it receive it will always disply it to the user for futher action.
Thanks
This requirement is not really feasible for a couple of reasons. First, what you are describing actually breaks most of the concepts that a certified app is required to follow. A subset of certification details can be found here: http://msdn.microsoft.com/en-us/library/hh184840(v=vs.92).aspx
Secondly, even if you planned to override the back button (possible) there really is no way to override the Windows, search or camera button at the OS level.
Best of luck!
Short answer: you can't. Application switching is part of the OS, and you don't have control over it.
Best workaround is to pin the app to start and allow it to do background processing with updates to the live tile.
If it's an absolute requirement, you'll have to jailbreak the phone and install your own OS on it.

Categories