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
Related
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.
I want to make a countdown timer (lets say 20 min.) for my windows phone application. But it should still be counting down, even if the application is not active.
For example: user clicks a button, then this button should not be available for 20 min. Even if the app is restarted, the phone is restartet or whatever.
How should i basically approach this? Is the background agent the way to go? Make some kind of periodicall shedule? Or read the phone clock?
Or are there other possibilities?
It should also not be easy to avoid (for example change the time on the phone, so that it is 20 min. later on the clock)
Has someone an idea? just searching for a point in the right direction here :).
Thanks
If you don't trust the phone to provide the time of record, the obvious answer is to use a remote time server to mark application activation time according to the remote server. If you also mark the local phone time at activation and calculate the difference between the two, you can use that difference to store what the remote server would (ideally) believe to be the current time that the button is pressed without having to call the remote server again.
One example of such a service is http://www.timeapi.org/utc/now.
I tired to searching of this question. Every time i search, it also showing that
Periodic agents typically run every 30 minutes.
To optimize battery life, periodic agents may be run in alignment with other background processes and therefore the execution time may drift by up to 10 minutes.
Windows phone app like skype, facebook, Whatsapp. These type of application are running in background and update notification every minute. Why the periodic agent typically run every 30minutes? then how these app to update the notification to alert user in the short period time eg: few minutes?
Thanks for your helps.
These applications are using push notifications to update the tiles. This is a message from a web server sent to the phone which the WP7/8 OS processes without the need for the app to run in the background.
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.
I am designing an application where the user selects the option to update his live tile and can forget about the app. Once he picks the option to update, I kick off a background task agent. But it looks like as per msdn, the background task agent will only run for upto two weeks.
How do I fire it again without having the user to come into the app?
It's not possible to run a Background Agent without rescheduling it every 14 days. Moreover, if the phone is in the battery-saving mode, it may not run the agent. So, you should find a better way to update the tile (Tile Push Notification).
Or, if you want to go with the Bckground Agent, the day before expiring, update the tile saying that the user should open the app to continue getting the tile updated. But, if he info is useful, the user will tap on the tile to get more info.
This has changed in Windows Phone 8. If the user has chosen your app for any of the lockscreen settings (Background, Content, or Status) the app will continue to run after the two weeks without the need for a launch by the user.
So if you have an application that the user decides to use as a part of their lock screen you are ok.
Otherwise I would go with setting a reminder the day you are going to expire. Each time the app is launched delete the reminder and make a new one two weeks out.
I also liked one of the comments above to change your tile status to "Launch me to get more updates".