Closed AndroidDeveloperLB closed 2 years ago
Hi @AndroidDeveloperLB, I think the DynamicColors.isDynamicColorAvailable() method should be what you are looking for?
@dsn5ft Looking at the code, it returns true for BuildCompat.isAtLeastT()
.
Does it mean that all Android devices from Android 13 will have it?
I thought that OEMs can still avoid using it, no?
All Android devices from T+ will be required to support it!
@dsn5ft Even far-east ones? Even Samsung, Xiaomi, OnePlus, Vivo,... ? Even Chinese models? They will all have to have the Material-You , that affects the OS ? What do you mean by "will be required" ?
It means the dynamic system colors like @android:color/system_accent1_600
are guaranteed to be populated with valid colors. It doesn't mean that the OS has to use them in their system UI.
@dsn5ft Populated based on the wallpaper colors (including from both image wallpapers and live-wallpaper apps) , right? Meaning that all apps could benefit them if the developers wish it, right? But again, will this be for all OEMs, including all I've mentioned?
Populated based on the wallpaper colors (including from both image wallpapers and live-wallpaper apps) , right?
I'm not sure about live-wallpapers but I would think so. Also, it doesn't have to be a wallpaper, it could be a color palette choice by the user.
Meaning that all apps could benefit them if the developers wish it, right? But again, will this be for all OEMs, including all I've mentioned?
Yes, I believe so.
@dsn5ft I see.
Is there an Intent too, to reach the wallpaper settings to choose the color-palette and also choose that it will be based on the live wallpaper?
Is there also an API to check what is the source of the dynamic colors (chosen by user, chosen from image-wallpaper, or chosen by live wallpaper) ?
Suppose my app is a live wallpaper app, can I check that the colors are originated from my app (when it's set) ?
If not, can you please add such APIs ?
I don't think those APIs exist, and we can't add them since they would have to be in the OS, not the Material library.
Feel free to file a "Framework" feature request here:
Meaning here: https://issuetracker.google.com/issues/new?component=192705&template=845803
ok thanks
@dsn5ft For the Intent, I actually requested here:
https://issuetracker.google.com/issues/216364001
For querying of the source of the dynamic colors, requested now:
https://issuetracker.google.com/issues/236994615
And for querying about whether the current live wallpaper is the source:
Is your feature request related to a problem? Please describe. Yes, because some devices don't support it, so we could offer alternative UI and also warn about it not being supported.
Describe the solution you'd like To have a boolean being returned to us, to see if the current device supports it.
Describe alternatives you've considered I don't think there is a way...
Additional context Requested here too: https://issuetracker.google.com/issues/234050622