Skip to content

Commit

Permalink
Syntax correction
Browse files Browse the repository at this point in the history
  • Loading branch information
c19354837 committed May 27, 2018
1 parent 43b2187 commit eb0de01
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,27 +25,27 @@ saveBrightness()|It will save current brightness and screen mode.
restoreBrightness() => Promise|Restore brightness and screen mode back to saveBrightness(). While iOS only restore the brightness, Android will restore both. <br><br>You should call this before setBrightness() or setBrightnessForce(). <br><br>It will return the saved brightness.
---|---
**Wifi**|
isWifiEnabled():Promise|Get wifi state, true if wifi is on.
isWifiEnabled() => Promise|Get wifi state, true if wifi is on.
switchWifi(complete)|It will open **Wifi Setting Page**, and you can change it by yourself. When come back to the app, the `complete` will be call.
switchWifiSilence(complete)|It will open wifi if the wifi is off, and close wifi when the wifi is on now. When it has done, the `complete` will be call.<br/>In android, it's done programmatically. <br><br>In iOS, I cannot do that by code for system limiting, so it just calls `switchWifi(complete)`<br><br>You need declare `android.permission.CHANGE_WIFI_STATE` in your AndroidManifest.xml, see [detail](https://github.com/c19354837/react-native-system-setting#powerful-api)
addWifiListener(callback):Promise| Listen the wifi state changing, and it will return the listener. (Android only)
addWifiListener(callback) => Promise| Listen the wifi state changing, and it will return the listener. (Android only)
---|---
**Location**|
isLocationEnabled():Promise|Get location state, true if location is on.
isLocationEnabled() => Promise|Get location state, true if location is on.
switchLocation(complete)|It will open **System Location Setting Page**, and you can change it by yourself. When come back to the app, the `complete` will be call.
addLocationListener(callback):Promise| Listen the location state changing, and it will return the listener. (Android only)
getLocationMode():Promise| Get current location mode code: `0` - 'off', `1` - 'gps', `2` - 'network', `3` - 'gps & network'. (Android only)
addLocationListener(callback) => Promise| Listen the location state changing, and it will return the listener. (Android only)
getLocationMode() => Promise| Get current location mode code: `0` - 'off', `1` - 'gps', `2` - 'network', `3` - 'gps & network'. (Android only)
---|---
**Bluetooth**|
isBluetoothEnabled():Promise|Get bluetooth state, true if bluetooth is on.
isBluetoothEnabled() => Promise|Get bluetooth state, true if bluetooth is on.
switchBluetooth(complete)|It will open **System Bluetooth Setting Page**, and you can change it by yourself. When come back to the app, the `complete` will be call.
switchBluetoothSilence(complete)|It will open bluetooth if the bluetooth is off, and close bluetooth when the bluetooth is on now. When it has done, the `complete` will be call.<br/>In android, it's done programmatically. <br><br>In iOS, I cannot do that by code for system limiting, so it just calls `switchBluetooth(complete)`<br><br>You need declare `android.permission.BLUETOOTH_ADMIN` in your AndroidManifest.xml, see [detail](https://github.com/c19354837/react-native-system-setting#powerful-api)
addBluetoothListener(callback):Promise| Listen the bluetooth state changing, and it will return the listener.
addBluetoothListener(callback) => Promise| Listen the bluetooth state changing, and it will return the listener.
---|---
**Airplane**|
isAirplaneEnabled():Promise|Get airplane state, true if airplane is on.
isAirplaneEnabled() => Promise|Get airplane state, true if airplane is on.
switchAirplane(complete)|It will open **System Setting Page**, and you can change it by yourself. When come back to the app, the `complete` will be call.
addAirplaneListener(callback):Promise| Listen the airplane state changing, and it will return the listener. (Android only)
addAirplaneListener(callback) => Promise| Listen the airplane state changing, and it will return the listener. (Android only)
---|---
**Other**|
setAppStore(isAppStore:bool)| `true` means that you'll submit your app to App Store. In order to throught the App Store review, it has some side effects, see [App Store](https://github.com/c19354837/react-native-system-setting#app-store).<br><br>`false` means that your app will not upload to App Store, and you can use any APIs at will.
Expand Down

0 comments on commit eb0de01

Please sign in to comment.