Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Android Settings - Controlling Brightness - Qt Android
majasticmoose last edited by
Hi I'm trying to develop an Android application that one of the functionality is changing the brightness of the tablet. I have successfully written two programs in Android Studio (in Java) using the LayoutParams and Android putInt system brightness to change brightness. The issue comes when I try to move the code to my Qt application. I have the JNI code working and it runs my functions, but when I paste the brightness code in to change brightness method the application fails.
From what I understand of Android and the error statements, my issue (I think) is I am not running the code on the UI thread. I've tried to force my Java method to be a Runnable and use runonUiThread but that doesn't support the ContentResolver or Window because it is not an Activity.
Does anyone have experience with this that can guide me? Or have any experience getting anything in the Android settings to work?
I appreciate everyone helping out,