We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Name: brightness Package: @capacitor-community/brightness
@capacitor-community/brightness
iOS and Android
I was able to implement simple one for iOS, not sure if it's the correct way to achieve this however (that Dispatch.main code).
Dispatch.main
import Capacitor @objc(Brightness) public class Brightness: CAPPlugin { @objc func get(_ call: CAPPluginCall) { call.success([ "brightness": UIScreen.main.brightness ]) } @objc func set(_ call: CAPPluginCall) { let brightness = call.getFloat("brightness", 1.0) DispatchQueue.main.async { UIScreen.main.brightness = CGFloat(brightness!) call.success() } } }
Allow developers to get and set screen brightness
The text was updated successfully, but these errors were encountered:
There is a plugin now: https://github.com/capacitor-community/screen-brightness
Sorry, something went wrong.
No branches or pull requests
Plugin Request
Name: brightness
Package:
@capacitor-community/brightness
Platform(s)
iOS and Android
Existing Solutions
I was able to implement simple one for iOS, not sure if it's the correct way to achieve this however (that
Dispatch.main
code).Description
Allow developers to get and set screen brightness
The text was updated successfully, but these errors were encountered: