Add methods to UserProfilePersonalizationSettings for retrieving lock screen and desktop background
Proposal: Add methods to UserProfilePersonalizationSettings for retrieving lock screen and desktop backgrounds
Today UserProfilePersonalizationSettings has methods to set the lock screen and desktop background asynchronously. I understand that getting the current wallpaper could violate privacy however some customization apps may need to access the lock screen/desktop background to do their job.
Summary
To methods TryGetLockScreenImageAsync and TryGetWallpaperImageAsync could be added to Windows.System.UserProfile.UserProfilePersonalizationSettings. Since this is privacy sensitive, Windows could show a dialog box asking the user whether the user wants to allow the app to access the lock screen/desktop background once. Instead of a permission or a capability, this can be asked every time the app calls the API.
Rationale
- More opportunity for developers writing apps that target the app container
Scope
| Capability | Priority |
|---|---|
| This proposal will allow developers to access desktop/lockscreen background while being inside a low IL process | Must |
| This proposal will allow end users to let apps access their desktop/lockscreen background | Should |
| This proposal will allow developers to access desktop/lockscreen background silently | Won't |
Important Notes
Same dialog should be shown when the API is accessed from unpackaged apps although those kinds of apps can use old Win32 APIs to achieve the same which won't show the consent dialog.
Open Questions
There is no violation of privacy in a contract based security model. They simply need to add the alert to the application contract. And no dialog is required. Upon installation, the user agrees to the application's access to personalization data such as background image.
Our pattern of declared capability (in the app manifest) and runtime use (the Request...) apis lets the user know that an app might ask for a power, and makes it clear when the app is asserting that power. Adding the APIs you suggest is interesting, but it'd be behind a combination of those two. The first time the app wants to use the power, the system asks the user - "is it OK for this app to change your background?" and there should be an "always" option so the user is never prompted again. (Although the app needs to Request... each time, subsequent requests may not actually pop the dialog if the user said "always.")
@Jaiganeshkumaran , can you briefly describe a hypothetical app that would get the user's lockscreen/background images, and what the app would want to do with those? You mention personalization, can you elaborate?
Theoretical app could provide additional features such as daily rotating imagery from a custom source, imagery that changes with day/night cycle, or even other triggers like ProjectReunion CI build failures.
Theoretical app could appear as such:

An example of what this feature or capability can be used for: acrylic wallpaper tinting like in MacOS So you would request the wallpaper -> get the dominant color -> cache it -> set it as the acrylic tint color
So in this example it would be nice to have a wallpaper change event too
We need this now
I request this functionality be added with Windows 10 support too
@Jaiganeshkumaran , can you briefly describe a hypothetical app that would get the user's lockscreen/background images, and what the app would want to do with those? You mention personalization, can you elaborate?
I would use to get wallpaper colors to achieve similair things to this https://twitter.com/LunaNeither/status/1397603160567468042
Why not simply just use Winaero Tweaker to extract the images?
Why not simply just use Winaero Tweaker to extract the images?
You can't do that programmatically in your UWP app. Also, Winaero Tweaker is a Win32 desktop app that reads from the registry which a UWP app can't do that easily except its own private hive (Local storage, roaming storage etc...)
Part Of:
-
#8.
-
#219.
@mominshaikhdevs Do you work at Microsoft? Why are you adding these comments to various issues in the repository?
@mominshaikhdevs Do you work at Microsoft? Why are you adding these comments to various issues in the repository?
It's obvious that I don't. Opening issues doesn't require "working at microsoft" so is the same as linking issues.
BTW, there is LockScreen Class and IDesktopWallpaper interface
@mominshaikhdevs It wasn't obvious to me or I wouldn't have asked. I would appreciate if you stop adding a bunch of noise to the issues in this repository.
@mominshaikhdevs ...a bunch of noise...
I disagree with your perception of "a bunch of noise". I would appreciate too if you do the reverse.