onyx-intl / OnyxAndroidDemo

158 stars 41 forks source link

Example of new Frontlight API in 3.4 firmware #108

Open calin-darie opened 1 year ago

calin-darie commented 1 year ago

Hi!

I have a few reports of people with Tab Ultra / Tab Ultra C / Palma devices, all on firmware 3.4, where the old CTMBrightness methods are failing.

Which API should I use?

https://github.com/calin-darie/gentle-glow-onyx-boox/issues/19

https://github.com/calin-darie/gentle-glow-onyx-boox/issues/20

https://github.com/calin-darie/gentle-glow-onyx-boox/issues/21

calin-darie commented 1 year ago

https://github.com/onyx-intl/OnyxAndroidDemo/pull/107/commits/f52728c9c1ca1b760fe7dd4ec4d18dfc6105df49

Alright, found something

Is onyx.sdk.device 1.2.26 published?

calin-darie commented 1 year ago

One thing I still can't figure out: what system properties are being changed by the new CTMBrightnessProvider and CTMTemperatureProvider

For the old API, the system properties used to be content://settings/system/screen_cold_brightness and content://settings/system/screen_warm_brightness

I need these in order to react to changes outside my app. It's also a good way to know when changes made by my app have taken effect, without polling.

calin-darie commented 1 year ago

Hi @Edward259 , can you please hellp?

Edward259 commented 1 year ago

You can monitor the changes in these values in CTM type, and I noticed that your app has been adjusted. content://settings/system/screen_ctm_brightness content://settings/system/screen_ctm_temperature content://settings/system/ctm_brightness_state_key content://settings/system/ctm_temperature_state_key