I have a Xamarin application and I need to check whether the Date&Time setting has enabled the "Set Automatically" property or not.
I need to validate the current Date&Time uses NTP time or not?
Images- Type-Parameter Start property Normal Date seetings
Steps for accessing NTP through the registry as follows(Normal windows not from APP)
1- Press the Windows logo key + R to open the Run box. Type Regedit and hit Enter.
2- When the Registry Editor opens, navigate to the following key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters to check Type property value is NTP or NoSync
3- In order to enable or disable “Set Time Zone Automatically” in Windows 10, navigate to the following key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\tzautoupdate
4- Double-click the 32-bit DWORD “Start” in the right pane. Set its value data to 3 if you want to make Windows 10 set time zone automatically. If you want to disable “Set Time Zone Automatically” in Windows 10, just set the value to 4.
I need to validate either 2 or 3 values through Xamarin UWP apps, whether The date&time setting is set to Automatically or not.
I am attaching the screenshots Please refer to this link for how we can get the Date&Time settings through Normal windows, I need to check this one through Xamarin UWP application.
If it is enabled I need to perform an operation otherwise I need to display an Alert that showing to "change the Date&Time setting and try again later".