clovisnicolas / flutter_screen

MIT License
145 stars 139 forks source link

Brightness not changing on Android 9.0 Pie #8

Open SankaCoffee opened 6 years ago

SankaCoffee commented 6 years ago

I implemented your example for setting the brightness (on Android) but it doesn't change anything. Also getting the brightness with Screen.brightness always returns 0, regardless of what i have defined in my settings.

[√] Flutter (Channel master, v0.10.1-pre.10, on Microsoft Windows [Version 10.0.17134.285], locale en-US) [√] Android toolchain - develop for Android devices (Android SDK 28.0.2) [√] Android Studio (version 3.2) [√] VS Code (version 1.28.0) [√] Connected device (1 available)

Running on Android 9.0 Pie. Tested on emulator and physical device

UPDATE: Also tested on another device with Android 7.0, there it does work

Shakle commented 5 years ago

It changes the brightness on my 9.0 Pie, but then I can't change it manually.

d-wolf commented 5 years ago

I can change my brightness on Pie.

[✓] Flutter (Channel unknown, v1.7.8+hotfix.4, on Mac OS X 10.14.6 18G84, locale en-DE)
    • Flutter version 1.7.8+hotfix.4 at /Users/danielwolf/Documents/GitHub/flutter
    • Framework revision 20e59316b8 (11 days ago), 2019-07-18 20:04:33 -0700
    • Engine revision fee001c93f
    • Dart version 2.4.0

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/danielwolf/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 10.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.3, Build version 10G8
    • CocoaPods version 1.7.5

[✓] iOS tools - develop for iOS devices
    • ios-deploy 1.9.4

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 3.4)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 37.1.1
    • Dart plugin version 183.6270
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

[✓] VS Code (version 1.36.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.2.0

[✓] Connected device (3 available)
    • Nokia 7 1 • CTLGAP1890501902 • android-arm64  • Android 9 (API 28)
    • macOS     • macOS            • darwin-x64     • Mac OS X 10.14.6 18G84
    • web       • web              • web-javascript • Google Chrome 75.0.3770.142