Windows Phone: Is it possible to mix toast notification and scheduled alarm? - windows-phone-8

I'm new to Windows Phone development. I'm going to implement reminder App with following features:
Remind every day/week/month
When remind occurs display it in notifications list
And I've got problem with it:
Alarms / Remind API is pretty good for my task. But it doesn't
create notification (I wanna see my remind in notifications list)
ScheduledToastNotification creates notification but it has too many schedule limitations
How to create correctly scheduled alarm + Toast notification?

Unfortunately when it comes to exact timed notifications, those are your only two options.
A possibility would be to use the regular Reminder and create the Notifications silently (without showing the toast popup). Won't be very reliable though.
If you can live with varying timings, you can try:
You could check out TimerTrigger but it has a lot
of limitations either.
In Silverlight Background Agents may work
for you (max. every 30 Min)

Related

How can I schedule a Background Task to trigger at a specific time

This is a Windows Phone 8.1 app. I want to be able to trigger a task to execute at a specific time. My main concerns are accuracy, resource and user experience.
I have tried a TimeTrigger with an IBackgroundTask but found that, aside from the minimum 15 minutes constraint, the execution time is far from accurate - sometime the task triggers 8 minutes later, some times 20 so no use for a scheduled trigger.
I have looked at toast but I need the task to run without user input and, as far as I can see, the toast notifications have no capability to trigger code execution without the user interacting.
I have looked at the alarm clock approach but, firstly it uses toast notifications and, secondly, I understand you can only have one alarm app that the user must declare so that's a bit intrusive.
I have looked at using a Task.Delay approach using async and await to avoid blocking the UI thread but this is hardly a background-centric approach.
Has anyone managed to find a way to create resource-friendly, scheduled background tasks (i.e. an alarm and sleep function) for Windows Phone 8.1?

Checking if notifications are enabled - Windows phone 8(.1)

Short question this time - is it possible for me to check whether the user has disabled notifications in the notifications/actions centre?
Currently, notifications are sent via MPNS, and work as intended, and the only "issue" is being aware if the user will receive toast notifications or not :)
The only two sources I managed to find so far even remotely connected are the one discussing possible restrictions due to the battery saver, and discussing sending toast notifications from application (which is not what is needed here).
Since MS states in their documentation that we're not supposed to "use your app to ask users to enable toast notifications if they have chosen to disable them. Your app is expected to work without toast notifications.", I feel that perhaps this information is not as freely accessible as it might seem at first glance, but hopefully some of you can either confirm my suspicions or help me overcome it :)

Run Windows Phone App in background without UI

I am developing a Windows phone 8 app that need to run only in background with UI. Is there any way I can run the app in the background, or without actually being open?
It depends upon what you want to do in the background. Generally speaking you can't implement something like a Windows service that will startup automatically when the phone is launched.
That said you can run your app in the background within given limitations. Check out MSDN for detailed information.
Why all these limitations you might ask yourself? It's to provide a good battery life to the user.
Edit:
For the periodic agent to start running the app must be started once. Further the agent must update a live tile (user must pin it to the start screen) or the app has to be once opened every 14 days.
Another option might be using push notifications to trigger an update..

windows phone 8: how to check if there are new messages on the database (server) all the time (even if the app is not running)?

I’ve been developing Windows desktop applications for many years, but just started developing Windows Phone 8 applications so, as you can imagine, I have many questions and doubts.
This is my problem so far:
I need an application to check any certain time if there are new messages / notifications in the server database, even if the application is not running, and show it (in some way, not sure how) on the phone. At the end, I want something similar to Facebook application (or others) that checks constantly if there are new messages even if I’m not using the phone.
How can I do that? Is there any tutorial or guide that explains that?
Thank you very much
There's two mechanisms available on Windows Phone to periodically check a data source and display notifications:
Push notifications: the server directly sends the notification to the phone. It provides the best user experience, because the notification is send (nearly) instantaneously, and because all the processing is done server-side (so it doesn't impact the phone's autonomy). The obvious drawback is that you need a server infrastructure to send the notifications.
Background agents: your application runs in background, is woke up periodically (every 30 minutes or so), and is allowed to run for about 15 seconds. During those 15 seconds, you can check your data source, and display a notification if needed. The two major drawbacks are that you can't choose when you're background agent executes (so the notification can be displayed 30 minutes late), and it'll have an impact on the battery life.
What you need is push notifications.
Microsoft already provides this functionality throught Azure Mobile Services and here is something to get you started : Get started with push notifications in Mobile Services

Toast notification on windows phone 8 without sound and vibration

I'm going to make a simple toast notification using periodic task of background agent, what
I'm asking is how can I show notification in specific time, but without playing sound notification or vibration, is there any way to achieve it?
Since what I've seen at http://msdn.microsoft.com/en-us/library/hh202962%28v=vs.92%29.aspx that VibrateController is unsupported api in background agent
Thanks!
It's completely up to the user to decide whether he/she want the sounds and vibration or not. There is nothing we can do as a developer to control such things. I believe it is one of Microsofts philosophies to not end up like Android in such matters.