Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Android Settings - Controlling Brightness - Qt Android
Forum Updated to NodeBB v4.3 + New Features

Android Settings - Controlling Brightness - Qt Android

Scheduled Pinned Locked Moved Mobile and Embedded
androidbrightnessandroid settingjni
1 Posts 1 Posters 959 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    majasticmoose
    wrote on 7 Jun 2015, 19:56 last edited by
    #1

    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,
    Andrew

    1 Reply Last reply
    0

    1/1

    7 Jun 2015, 19:56

    • Login

    • Login or register to search.
    1 out of 1
    • First post
      1/1
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved