How to save Toast notifications to local database in windows phone 7? - c#

I am new to Windows phone 7 Push Notifications. I am able to send and receieve tile, toast notifications in my phone. However, my problem is, I want to save all these notifications to a local database in windows phone7.
When the application is running and if a toast message arrives, I can capture that event and we can save the data to local db, its fine.
But if the application is not running, and if I get a toast message, I need to save this message to the local database. I am unable to find a way for this problem. Please help me.

The bad news is that you can't do this at the moment (not in 7.0 or 7.5 Mango)
You can run background tasks on a WP7 device running Mango (7.5) while your app isn't running as detailed here: Windows Phone 7.5 Periodic Tasks
But there are limitations: The task will only fire once every 15 minutes or so, it won't be able to monitor for toasts while the app is off.
If you control the server that is sending the Toast messages then the best bet is for your periodic task to connect to the server every 15 mins and, if there are new toast messages, for it to collect them and then store them in the local DB.

Related

How to set daily toast in app

I wrote a Windows Phone 8.1 (WINPRT) App. One of the features of this app is alarm/reminder.
For Example: user sets the Reminder at 7AM in app's Reminder Page. App must give alarm/reminder daily at 7AM. Now as I got to know, that alarm and reminder are not available in Windows Phone 8.1, so I thought of using Toast.
How will this app give a toast at user set time everyday.?
Also, how to make this app run in background for this purpose.
Any other better solution for this problem?
If your app is running a background process, it will be invoked every 30 minutes or so. You won't be able to get it to send out a toast notification exactly at 7am as far as I know, but you can get it within 15 minutes or so of 7am.
You can also schedule a toast notification to occur. Details here.
Have you looked into this?
https://msdn.microsoft.com/en-us/library/windows/apps/hh202965%28v=vs.105%29.aspx?f=255&MSPPError=-2147217396
I think this might answer your question

How to get my notification to contionuosly alert my user windows 8.1 device or c#

I have successfully been able to send and receive notifications between my windows 8.1 application and my server using WNS. The only problem is when my toast notification comes through to my device it shows for about 10 seconds then disappears. This is no good for me as if my user was not with their device they would miss the notification completely. So what I want to know is where I fix this problem?
1.Is there a setting in the device that I can change to have the notification continue for more than 10 seconds. Or to make sure the notification keeps working till the user has touched the notification or device.
2. Or do I need to specify in the server that the same notification needs to be sent every say 10 minutes till the user has client app side has acknowledged that the notification has been seen?
What is the best way to do this?
Stuart's answer is correct. A Toast notification is not meant to be continuously visible, but a Live Tile notification can be. I think you would be best off by throwing a toast notification to immediately notify the customer and then have a live tile that shows the information as well.
Throwing a notification every 10 minutes is incredibly annoying. I would delete your app in a heartbeat if you did that to my phone/machine.

C# Metro app toast notifications show up after long delay or not at all on Local Machine?

I have a Windows Store App (Metro) that uses toast notifications. The notifications work beautifully when remote debugging on my WinRT device (Surface 2). However, when running on my desktop in Local Machine or Simulator mode, they are really erratic. Sometimes showing up several minutes later and occasionally not at all. Does anyone know how to fix this?

Show pending push notification count in Windows Phone

I am creating an WebView app i.e it contains only WebBrowser control which opens some enterprise mobile web app. I am using Urban Airship for push notifications.
Now I want to show the pending tile/toast notification count as badge on tile as well as on lock screen. How do I perform that? Is there any event which occurs when notification is pushed, if yes how can I use to maintain the count? Can I use background task? I am thinking to clear the badge when app is launched.
I am totally new in push notifications for Windows Phone. I searched a lot but didn't get expected results.
Get tile notifications count Windows phone
Count unreaded Number of missed call and message in windows phone
Here is a good sample of tile notification in msdn. You don't even need a background agent for this task, it will be done by the system. There is also a toast notification sample.

run task on specific time in windows phone 7

Can we run some task on specific time in background if my application is running or on dormant state. Is this possible in windows phone 7.5 Mango. If Its not possible then any work around with the help of push notifications.
If you are not the currently active application in Windows Phone your application is being tombstoned, which means that some of your state is saved and your application is halted (e.g. there is no code running for your application anymore).
Therefor you can not create code that allows your application to do anything at a specific time, without using push notification.
Even with push notification your options are very limited. It realy depends on what you want to happen when a notification arives.

Categories

Resources