Programmatically change device developer options on Android
Asked Answered
O

2

6

I'm playing around with android studio and I'm curious to see if it is possible access and change the developer options on my device when running my own app.

Specifically I'm interested in changing the "Simulate color space" options. The values I can set by going to developer options are:

  1. Deactivated

  2. Monochromacy

  3. red-green

  4. blue-yellow

Does anyone have any experience changing these settings (or other similiar settings) with java using android studio?

Thanks in advance.

Offen answered 19/6, 2018 at 19:25 Comment(1)
it is impossible due to security resonsBrandnew
J
3

According to this reply you can check the current state of inversing display colors and of high contrast.

But changing any developer options is not allowed unless yours is a system app, see Programmatically switch to developer mode in Android

If you really want it, you'll probably have to apply a theme for your app with specially selected colors.

Jinajingle answered 19/6, 2018 at 20:41 Comment(1)
Thank you for the answer - was really helpful.Offen
A
0

Please see my answer, which solves this for you.

This does require either ROOT, or permissions to be granted via ADB (see answer).

All the best, Tom.

Aran answered 11/12, 2019 at 11:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.