Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] Update docs to mention Android permission requirement #35

Closed
CillianMyles opened this issue Oct 17, 2024 · 2 comments
Closed

[feat] Update docs to mention Android permission requirement #35

CillianMyles opened this issue Oct 17, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@CillianMyles
Copy link
Contributor

Description (What is the problem)

Upgraded to 2.0.0+1 to try out the system brightness (thanks for adding that 🙏), and for Android I got an error logged when first trying to change the system brightness:

E/flutter ( 1332): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(-1, Unable to change system screen brightness, null, null)
E/flutter ( 1332): #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:648:7)
E/flutter ( 1332): #1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:334:18)
E/flutter ( 1332): <asynchronous suspension>
E/flutter ( 1332): #2      MethodChannelScreenBrightness.setSystemScreenBrightness (package:screen_brightness_platform_interface/method_channel_screen_brightness.dart:76:5)
E/flutter ( 1332): <asynchronous suspension>
E/flutter ( 1332): #3      PlayerController.setBrightness (package:faradaysounds/src/player/player_controller.dart:202:5)
E/flutter ( 1332): <asynchronous suspension>

And a native Android settings screen popped up:

I checked the PR (#34) which introduced the system brightness change and saw that a permission was added to the Android part of the example app.

After adding that same permission to my own app, I was able to accept the Allow modifying system settings and then could change the system brightness successfully.

Solution suggestion

Add a note about the permission to the README so others can skip this issue.

@CillianMyles CillianMyles added the enhancement New feature or request label Oct 17, 2024
@CillianMyles CillianMyles changed the title [feat] Update docs to mention Android permission requirment [feat] Update docs to mention Android permission requirement Oct 17, 2024
@aaassseee
Copy link
Owner

Hi @CillianMyles. Thanks for the suggestion. I will update the README file this week.

@CillianMyles
Copy link
Contributor Author

Hi @CillianMyles. Thanks for the suggestion. I will update the README file this week.

I made a stab at it #37

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants