brett
brett

Reputation: 791

How can I launch the Alarms App through a Universal Windows App

I am trying to launch the default Alarms App somewhere in my app through an action the user performs. I know you can now add your own alarms and notifications but I want the user to be able to use the default Alarms App.

How would I go about doing this?

Upvotes: 2

Views: 391

Answers (2)

AlexDrenea
AlexDrenea

Reputation: 8039

With the Universal Application Model it is not possible to launch other apps at random. You can only launch an app if it enables deep-linking.

Here is a great article about deep-linking and app to app communication in general.

For your particular question, @Sunteen provided a great answer as to how to open the alarms app but more importantly, how you can find which apps you can open and what their protocol extension is.

Upvotes: 1

Sunteen Wu
Sunteen Wu

Reputation: 10627

You can use Launcher class to launch the Alarms App by uri as follows:

await Windows.System.Launcher.LaunchUriAsync(new Uri(@"ms-clock:"));

The uri of Alarms&CLock is ms-clock in system. You can find the protocol in Settings->System->Default Apps->Choose default app by protocol in a PC device. Pay attention the Alarm&Clock app should be existed in the device. More details you can reference:Launch the default app for a URI

Upvotes: 5

Related Questions