Access and update the system brightness on a device Android vs IOS
yarn add rn-system-brightness
npm i --save rn-system-brightness
Also update you manifest params and include xmlns:tools
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.baseproject"
xmlns:tools="http://schemas.android.com/tools"> // <---add
Open the manifest file of your Android project and add
<uses-permission
android:name="android.permission.WRITE_SETTINGS"
tools:ignore="ProtectedPermissions"
/>
cd ios
pod install
import Brightness from "rn-system-brightness";
// SET
await Brightness.setBrightness(0.8); // between 0 and 1
// GET
const brightness = await Brightness.getBrightness();
// GET max brightness
const maxBrightness = await Brightness.getMaxBrightness();
// GET Permission ANDROID
const per = await Brightness.hasPermission(); // boolean true or false
// REQUEST ANDROID > 6
await Brightness.requestPermission();