How to obtain access to 'HumanPresenceSettings. SetingsChanged'

charles yu 1 Reputation point
2025-02-17T07:55:28.4633333+00:00

The "HumanPresenceSettings" instance I returned through this method, 'humanPresenceSettings=await HumanPresenceSettings. GetCurrentSettings Asynchronous ()', can read the relevant settings. However, when I subscribe to 'HumanPresenceSettings. SetingsChanged' or call the 'HumanPresenceSettings. updateSetes()' method, it throws an exception 'Access is denied.' (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)). What else do I need to do?

UWP Package.appxmanifest:

<Capabilities>

<Capability Name="internetClient"/>

<DeviceCapability Name="webcam"/>

<DeviceCapability Name="humanPresence" />

</Capabilities>

windows Settings:User's image

Universal Windows Platform (UWP)
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,305 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
10,803 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.