I am now able to control the backlight from my C code by writing to /sys/class/leds/lcd-backlight/brightness. However I had to disable the security policy enforcement to be able to do that. That obviously is not a solution I could use on a production device. Still looking for a better solution. I would guess I need to communicate with some android service which controls the backlight but I don't know which service is that.
On Monday, December 14, 2015 at 7:41:42 AM UTC-8, Rehan Hameed wrote: > > I am writing AOSP C code which needs to update screen brightness. I know > that from Java we could use android.provider.Settings.System.putInt to > achieve that. However I don't know how to do this from C code. Will be > great to get advice on that! > > > > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/android-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/ba7ff95f-f473-470e-8d26-6d7058280517%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

