如何通过通用 Windows 应用程序启动警报应用程序 [英] 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.
我该怎么做?
推荐答案
您可以使用 Launcher 类通过 uri 启动警报应用程序,如下所示:
You can use Launcher class to launch the Alarms App by uri as follows:
await Windows.System.Launcher.LaunchUriAsync(new Uri(@"ms-clock:"));
Alarms&CLock 的 uri 在系统中是 ms-clock
.您可以在 PC 设备的设置->系统->默认应用程序->按协议选择默认应用程序中找到该协议.注意Alarm&Clock 应用程序应该存在于设备中.您可以参考更多详细信息:启动默认应用程序一个 URI
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
这篇关于如何通过通用 Windows 应用程序启动警报应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!