UNPKG

1.39 kBMarkdownView Raw
1# expo-brightness
2
3Provides an API to get and set screen brightness.
4
5# API documentation
6
7- [Documentation for the main branch](https://github.com/expo/expo/blob/main/docs/pages/versions/unversioned/sdk/brightness.md)
8- [Documentation for the latest stable release](https://docs.expo.dev/versions/latest/sdk/brightness/)
9
10# Installation in managed Expo projects
11
12For [managed](https://docs.expo.dev/versions/latest/introduction/managed-vs-bare/) Expo projects, please follow the installation instructions in the [API documentation for the latest stable release](https://docs.expo.dev/versions/latest/sdk/brightness/).
13
14# Installation in bare React Native projects
15
16For bare React Native projects, you must ensure that you have [installed and configured the `expo` package](https://docs.expo.dev/bare/installing-expo-modules/) before continuing.
17
18### Add the package to your npm dependencies
19
20```
21expo install expo-brightness
22```
23
24### Configure for iOS
25
26Run `npx pod-install` after installing the npm package.
27
28### Configure for Android
29
30Add `android.permission.WRITE_SETTINGS` permission to your manifest (`android/app/src/main/AndroidManifest.xml`):
31
32```xml
33<uses-permission android:name="android.permission.WRITE_SETTINGS" />
34```
35
36# Contributing
37
38Contributions are very welcome! Please refer to guidelines described in the [contributing guide](https://github.com/expo/expo#contributing).