MCPcopy Index your code
hub / github.com/c19354837/react-native-system-setting / SystemSetting

Interface SystemSetting

SystemSetting.d.ts:33–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31}
32
33interface SystemSetting {
34 getBrightness: () => Promise<number>;
35 setBrightness: (val: number) => Promise<boolean>;
36 setBrightnessForce: (val: number) => Promise<boolean>;
37 getAppBrightness: () => Promise<number>;
38 setAppBrightness: (val: number) => Promise<true>;
39 grantWriteSettingPremission: () => void;
40 getScreenMode: () => Promise<number>;
41 setScreenMode: (val: number) => Promise<boolean>;
42 saveBrightness: () => Promise<void>;
43 restoreBrightness: () => number;
44 getVolume: (type?: VolumeType) => Promise<number>;
45 setVolume: (value: number, config?: VolumeConfig | VolumeType) => void;
46 addVolumeListener: (
47 callback: (volumeData: VolumeData) => void
48 ) => EmitterSubscription;
49 removeVolumeListener: (listener?: EmitterSubscription) => void;
50 isWifiEnabled: () => Promise<boolean>;
51 switchWifiSilence: (onComplete?: CompleteFunc) => void;
52 switchWifi: (onComplete?: CompleteFunc) => void;
53 isLocationEnabled: () => Promise<boolean>;
54 getLocationMode: () => Promise<number>;
55 switchLocation: (onComplete?: CompleteFunc) => void;
56 isBluetoothEnabled: () => Promise<boolean>;
57 switchBluetooth: (onComplete?: CompleteFunc) => void;
58 switchBluetoothSilence: (onComplete?: CompleteFunc) => void;
59 isAirplaneEnabled: () => Promise<boolean>;
60 switchAirplane: (onComplete?: CompleteFunc) => void;
61 openAppSystemSettings: () => Promise<void>;
62 addBluetoothListener: (
63 callback: (bluetoothEnabled: boolean) => void
64 ) => Promise<EmitterSubscription>;
65 addWifiListener: (
66 callback: (wifiEnabled: boolean) => void
67 ) => Promise<EmitterSubscription | null>;
68 addLocationListener: (
69 callback: (locationEnabled: boolean) => void
70 ) => Promise<EmitterSubscription | null>;
71 addLocationModeListener: (
72 callback: (locationMode: number) => void
73 ) => Promise<EmitterSubscription | null>;
74 addAirplaneListener: (
75 callback: (airplaneModeEnabled: boolean) => void
76 ) => Promise<EmitterSubscription | null>;
77 removeListener: (listener?: EmitterSubscription) => void;
78}
79
80declare const systemSetting: SystemSetting;
81export default systemSetting;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected