Search Unity

Android and display brightness

Discussion in 'Android' started by Mirek Uhlir, Mar 12, 2011.

  1. Mirek Uhlir

    Mirek Uhlir

    Joined:
    Dec 25, 2009
    Posts:
    124
    Hi community
    I created a game for Android, which is controlled by only a gyroscope. A player may not touch the screen.
    I have a problem with that if your device does not record any touching display, brightness of the display is reduced . How can I do to get not change the brightness? Thanks for any advice.
     
  2. EricJ13

    EricJ13

    Joined:
    Feb 28, 2009
    Posts:
    355
    iPhoneSettings.screenCanDarken = false seems to work. I set it in Awake on my first scene, screen never darkens.
     
  3. Mirek Uhlir

    Mirek Uhlir

    Joined:
    Dec 25, 2009
    Posts:
    124
    Thank you.
    iPhoneSettings really works on Android?
    Unfortunately I can not try it now.
     
  4. FiveFingers

    FiveFingers

    Joined:
    Oct 15, 2009
    Posts:
    541
    I tried in the gamecontroller awake like the iOS is doing,
    and I have read on the manual that THIS particular setting is cross platform, but the screen darkens in Debug, even with the droid setting: Stay active set in debug mode.

    I didn't test a signed non development build yet.

    Is working there ?
     
  5. kaliAJ

    kaliAJ

    Joined:
    Sep 29, 2018
    Posts:
    18
    @FiveFingers @EricJ13

    how do I control the system brightness through my in-game slider on the android platform?
    I tried using FunPlus SDK but it doesn't seem to work for me.
    basically I cannot modify the brightness when it's in auto mode, and when shifted to the manual it just works as boolean.
     
  6. Vadimskyi

    Vadimskyi

    Joined:
    Jan 13, 2020
    Posts:
    12
    Sorry for bumping this old thread, but i still could not find an answer for this question. Aside from native android plugins, is there a solution?