1

I am naive in BB platform. I own a blackberry Z10. I want to develop an app that should provide me following requirements,

  • Change phone brightness from the app.
    The issue here is when I change brightness it works untill I am in the app. When I exit app, the settings revert. I am developing something like (I hope it helps):

    https://play.google.com/store/apps/details?id=com.haxor

    I have tried to port the app from ART and it doesn't work for me.
    So If there's a solution out there in any ways ART or native blackberry. Please help.

Cœur
  • 37,241
  • 25
  • 195
  • 267
IndiesApps
  • 81
  • 6

1 Answers1

0

BlackBerry doesn't provide such API, you'll also notice that those kind of Android apps will only be able to dim screen for apps that are run in the Android runtime on your BlackBerry 10 device.

The closest I've come to do such behavior is to use the bkltctl command : https://github.com/RodgerLeblanc/TheUnexposedAPIs/blob/master/src/Backlight/Backlight.cpp#L88-L93

You can use this command line on your device to learn more about it (with BGShellPlus app for example) :

use bkltctl

The command line used in TheUnexposedAPIs is this one (50% brightness in this example) :

bkltctl brightness set_brightness display 0.5

Note that it's far from reliable as the brightness will be set back automatically by the OS when the ambiant light sensor of your device notice a luminosity change.

Roger Leblanc
  • 1,543
  • 1
  • 10
  • 9