Search code examples
windows-phonewindows-phone-8.1

Detect Quite hours On/Off on Windows Phone 8.1


Is exists any way how to detect if "Quite hours" is turned on or off on Windows Phone 8.1 (WinRT)?

Thanks


Solution

  • The short answer is no, you can't.

    The API was Added with Windows Phone 8.1 Update 1. However, you can only use it with special permission from Microsoft (which average developers have no chance of getting) because it's inteded for developers of smart Bluetooth devices such as smart watches only. In case you're curious the relevant API is below, but as I said there's no way to use it.

    public class Windows.Phone.Notification.Management.AccessoryManager {
          ...
          public bool DoNotDisturbEnabled { get; }
          ...
    }