Check if devices dark mode is on

Hi! I want to create an app with a setting that the user can chose wither the app have to be in the light mode or the dark mode. I can do It with this extension (If it supports MIT App inventor too)
But I want to add an option to set it to devices theme too.

and for that, I need to check if the devices dark mode is on or not.
how I can check that?

You cannot poll the status of Theme using Blocks.

Why? Theme is a property. Theme can only be set at compile time and the Companion will approximate changes during live development. You cannot poll Theme using Blocks. See Screen

You may have to write an extension.


Darkie should be supported download and tell us a result

@Gordon_Lu has solved this in his/her Device Extension! Thanks!
btw @powerusers I have another problem about dark and light mode. should I Edit this existing topic and clear the solution mark or should I open a new one?
Edit: It is returning another thing as @Gordon_Lu said

First of all i dont think mentioning powerusers is a good idea and secondly if your question is about checking dark mode enabled then only ask otherwise you should open new topic.

1 Like

Thanks Aarush.