Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

Commit

Permalink
Merge branch 'release/1.5.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
federicoboschini committed Aug 29, 2018
2 parents 31fc55f + 4abdf76 commit 65de6cd
Show file tree
Hide file tree
Showing 8 changed files with 206 additions and 281 deletions.
15 changes: 1 addition & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,21 +57,8 @@ connectivityStatusSubscription.remove()
```

### Enable services
```js
import ConnectivityManager from 'react-native-connectivity-status'

// Ask user to turn on Location Services
ConnectivityManager.enableLocation()

// Ask user to turn on Bluetooth
ConnectivityManager.enableBluetooth()
```

**ATTENTION:** On `iOS` the `enableLocation` method won't ask the user for `Location Permissions` but will redirect to
`iOS` location settings screen to allow the user to enable `Location Services`.
In case `Location Services` are active but `Location Permissions` have yet to be asked to the user the method call will throw an error.

**ATTENTION:** Starting from `iOS 11` redirect to specific Settings page has been disabled, so the `enableLocation` method will only redirect to the `Settings` main screen.
**NOTE:** Due to possible app rejection from Apple (caused by illegal usage of private URL Scheme "prefs:root" or "App-Prefs:root"), methods for enabling bluetooth and location services have been removed from this module.

---
Made with :sparkles: & :heart: by [Mattia Panzeri](https://github.com/panz3r) and [contributors](https://github.com/nearit/react-native-connectivity-status/graphs/contributors)
19 changes: 11 additions & 8 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@

buildscript {
repositories {
google()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:1.3.1'
classpath 'com.google.gms:google-services:3.1.1'
classpath 'com.android.tools.build:gradle:3.1.4'
classpath 'com.google.gms:google-services:4.0.1'
}
}

allprojects {
repositories {
google()
jcenter()
maven {
url "https://maven.google.com"
Expand All @@ -22,12 +24,12 @@ allprojects {
apply plugin: 'com.android.library'

android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
compileSdkVersion 27
buildToolsVersion "27.0.3"

defaultConfig {
minSdkVersion 16
targetSdkVersion 22
targetSdkVersion 27
versionCode 1
versionName "1.0"
}
Expand All @@ -37,11 +39,12 @@ android {
}

repositories {
google()
jcenter()
mavenCentral()
}

dependencies {
compile 'com.facebook.react:react-native:+'
compile 'com.google.android.gms:play-services-base:11.8.0'
compile 'com.google.android.gms:play-services-location:11.8.0'
implementation 'com.facebook.react:react-native:+'
implementation 'com.google.android.gms:play-services-location:15.0.1'
}
Loading

0 comments on commit 65de6cd

Please sign in to comment.