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

Is there a plan to support adjusting the brightness? #18

Open
yangpeng7 opened this issue Jun 25, 2023 · 5 comments
Open

Is there a plan to support adjusting the brightness? #18

yangpeng7 opened this issue Jun 25, 2023 · 5 comments

Comments

@yangpeng7
Copy link

Thanks for the repository. Is there a plan to support adjusting the brightness?

@svprdga
Copy link
Owner

svprdga commented Jun 26, 2023

@yangpeng7 to be completely honest with you, I had no idea you could adjust the brightness of the flashlight. Can you send me the respective Android/iOS documentation? I'll look at it.

@yangpeng7
Copy link
Author

@svprdga Thank you for your reply. The documentations about adjusting the brightness are as follows:

Android:
https://developer.android.com/reference/android/hardware/camera2/CameraManager
turnOnTorchWithStrengthLevel (Added in API level 33)

iOS:
https://developer.apple.com/documentation/avfoundation/avcapturedevice/1624609-settorchmodeon
setTorchModeOn

@yangpeng7 yangpeng7 reopened this Jun 27, 2023
@svprdga
Copy link
Owner

svprdga commented Jun 27, 2023

@yangpeng7 thanks for the info. I'm creating a feature branch with this enhancement, I'll let you know when it's finished so you can test it before creating a new plugin version.

@svprdga
Copy link
Owner

svprdga commented Jun 27, 2023

@yangpeng7 could you please try the branch feature/adjust_brightness_level?

I've tested it on iOS and it works OK but unfortunately I don't have any Android device capable of adjusting the strength, nevertheless the feature is also implemented for Android but needs real testing.

@jstevensconverus
Copy link

@svprdga Unfortunately, adjusting the brightness level on any Android phone creates an error. I tested the functionality on multiple Android devices.

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

No branches or pull requests

3 participants