Toast notification disappears after 10 sec,if user does not tap on that and I am not able to get How to handle this, if user misses the notification.
Requirement is that toast should not disappear untill user taps on it.
One way of doing this is to send toast and tile notification at the same time.so that if user misses the toast notification then he may find it on tile.But not able to get how to do it using push sharp.So please suggest any solution for the following :
How to decide duration of toast notification using push sharp?
If 1st one is not possible then how to send toast and tile notification together using push sharp?
Thanks
A toast notification displays for about 10 seconds unless the user dismisses it with a flick to the right. If the user taps the toast, by default, your app's start screen launches. Or, you can choose to specify which screen of your app will launch.
There is no way to override the duration of the toast notification.
Related
I am working on a Windows Phone 8.1 silverlight app, raw notifications handling.
The App when receives notifications in foreground, has to cancel the notification and create a new notification using ToastNotificationManager.CreateToastNotifier().
It also has a backgroundtask to work on the raw notifications received in background, which converts the raw notifications received to toast notification using ToastNotificationManager.CreateToastNotifier().
Also some action A needs to be performed on clicking of this notification.
The issue arises when the App receives the notification when in foreground, but the notification is clicked after suspending the application. Since the registered activated event of such type of notification is not in the background task (because the notification was formed in the foreground logic), no action A is performed on clicking of the notification.
This seems to a limitation, for WP8.1 silverlight apps. Can somebody suggest a solution for this issue??
If you need to do some action after tap on Toast you should add wp:Param to your Toast with deep url and handle in you app.
Toast will be look like
<wp:Notification xmlns:wp=\"WPNotification\">
<wp:Toast>
<wp:Text1>You title</wp:Text1>
<wp:Text2>Your subtitle</wp:Text2>" +
<!-- You can add any parameter you want in deep url -->
<wp:Param>/Page2.xaml?NavigatedFrom=Toast Notification</wp:Param>
</wp:Toast>
</wp:Notification>
When you tap on toast it by default will open Page2.xaml of your app and pass uri parameters to it
I have implemented Fast resume in my windows phone 8 app and its working fine in every case except following scenario.
Steps:
1)Phone is password locked
2)Toast is received.
3)Tap on toast.
4)App is activated.
5)The page which was last on backstack opens up with reset state.
6)No more navigation
In Fast Resume app should receive one more navigation with deep link on tapping on toast which is missing in this case.
Please find sample here.
This feature of Windows Phone. If the reminder or toast to send from your lock screen (even without a password), the navigation application is limited. I think that there is no way now to fix this behavior ...
I got even more unpleasant situation with reminders of the applications:
1) If screen is not locked and you gave a reminder of the application, then click on the reminder will open the application, you can immediately take action in response to the reminder. All well and good.
2) when the lock screen (even without a password) and you send a reminder of your application, there is no ability to navigate the application by clicking the reminder. Reminder, you can only cancel or postpone for a while. Then the user must unlock the screen, open the program and try to understand what to do in response to this reminder.
At least toast is displayed in the notification center, and the reminder disappears without a trace and the user attempts to find what caused the reminder.
I do not understand why such inconvenient behavior for user application communicates with the lock screen.
Wrote a post on UserVoise, but without response.
Enable to open a task or an appointment directly by tap on the reminder
I'm working on a Windows Phone app that will receive push notifications and needs to show critical alerts to the user. As far as I can see there are 3 types of push notification:
Raw Notification - Raw notifications are used when your application is actually running on the device. This allows you to
update your interface “live” as the user is using it.
Toast Notification – This message will be received regardless of whether your application is running or not, but popping toast messages
while your app is running might be a little annoying. I’ll
demonstrate this example below. Toast WILL NOT also update your
application’s data. You still need to pass a Raw Notification to make
this happen.
Tile Notification – If your application is pinned to the user’s Start screen, you can update the Tile for your application. You can
change the background image, as well as an integer from 0-99.
source: http://www.jeffblankenburg.com/2010/10/19/31-days-of-windows-phone-day-19-push-notifications/
These each have different behaviours, but none lend themselves to critical notifications, where the user can be actively alerted to critical information.
Having read Guidelines for toast notifications on MSDN, it suggests
Don't use toast notifications to notify the user of something that
must be seen, such as a critical alert. To ensure that the user has
seen your message, notify them in the context of your app with a
Flyout, dialog, app bar, or other inline element.
So the question is, how can I trigger a "flyout, dialog, app bar or other inline element" if my app is closed and the phone receives a critical notification.
long story short: you can't enforce that your app opens on an incoming pns
But I think you've got the toast scenario wrong. A toast can be used to notify the user, if he taps it the app opens and you might react to that by the navigation uri (e.g.: ?fromToast=true).
If you receive a toast notification while your app is open the toast won't show. Toast Notifications only get displayed when your app isn't open. But you can react to an incoming toast notification (there's an event for that) to implement an behavior of your way (e.g.: flyout, msgbox, ...).
note: introduced with GDR3: The sound of the toast notification can now be changed (even made silent).
While my app is running I can receive toast notification,on ShellToastNotificationReceived(object sender, NotificationEventArgs e) event handler as keys in e.Collection.
If my app is not running and a toast notification arrives, a toast is displayed but how i can i handle this notification?
I mean which event is fire when my application is not running and notification arrives.
I know background agent but its not fulfill my requirement
Thanks.
Windows Phone platform is responsible to handle Push Notifications and developers don't have a direct access for notification handling when an app is not running. That means you can't do any background logic after Toast is received. But when Toast message contains <wp:Param> value with an Uri to a specific app page then user will be redirected to this page, if user taps a Toast popup. So, you can do specific job after user tapped a Toast popup. To accomplish it, you need add an parameter to Uri, for example /YourPage?IsToast=true and override OnNavigatedTo method of the page to run your business logic:
protected override void OnNavigatedTo(NavigationEventArgs e)
{
base.OnNavigatedTo(e);
if (NavigationContext.QueryString.ContainsKey("IsToast"))
{
//do your business here
}
}
For other cases you need to use a background worker.
yes we can handle the toast notification. once the user clicks on toast notification we can send a request to our web service and do our job.
what happens when an user clicks on toast notification is it will redirect to the application launching event in App.Xaml.cs page. in that event depending upon the toast content you can proceed to the next step.
hope this helps.
still if you didn't get it done, just drop a mail to me
happy coding.
I am developing an application in windows phone which having push notification facility. I am able to receive push message at device.
If Application is not running , I am getting message at home screen on the click of that msg it starts that application. I want to perform some task on the basis of that Push Notification Message. But i am not able to handle that event.
Please help me to handle that EVENT if application is running or application is in background or application is not running .
Thanking You,
Which type of notification are you sending? Based on your question I assume you are referring to toast notifications.
When do you want to perform the task - before or after the user clicks on the message? If the application is not running, you can only do it after clicking the message.