react-native-communications
Advanced tools
Comparing version 0.2.3 to 1.0.0
@@ -5,5 +5,3 @@ 'use strict'; | ||
var { | ||
LinkingIOS, | ||
IntentAndroid, | ||
Platform, | ||
Linking, | ||
} = React; | ||
@@ -150,10 +148,9 @@ | ||
var LaunchURL = function(url) { | ||
var Linker = Platform.OS === 'android' ? IntentAndroid : LinkingIOS; | ||
Linker.canOpenURL(url, (supported) => { | ||
if (!supported) { | ||
console.log('Can\'t handle url: ' + url); | ||
} else { | ||
Linker.openURL(url); | ||
} | ||
}); | ||
Linking.canOpenURL(url).then(supported => { | ||
if(!supported) { | ||
console.log('Can\'t handle url: ' + url); | ||
} else { | ||
return Linking.openURL(url); | ||
} | ||
}).catch(err => console.error('An unexpected error happened', err)); | ||
}; | ||
@@ -160,0 +157,0 @@ |
{ | ||
"name": "react-native-communications", | ||
"version": "0.2.3", | ||
"description": "Easily call, email, text or iMessage (iOS only) someone in React Native", | ||
"version": "1.0.0", | ||
"description": "Open a web address or call, email, text or iMessage (iOS only) someone in React Native", | ||
"main": "AKCommunications.js", | ||
@@ -6,0 +6,0 @@ "repository": { |
@@ -9,2 +9,4 @@ # react-native-communications | ||
If you are on **React Native >= 0.20** just | ||
```bash | ||
@@ -14,2 +16,8 @@ npm install react-native-communications | ||
Versions 0.15 through to and including 0.19 of React Native are also supported by running the following installation command | ||
```bash | ||
npm install react-native-communications@0.2.3 | ||
``` | ||
## Methods | ||
@@ -16,0 +24,0 @@ |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
10800
1
171
136