diff --git a/Examples/UIExplorer/IntentAndroidExample.android.js b/Examples/UIExplorer/LinkingExample.js similarity index 87% rename from Examples/UIExplorer/IntentAndroidExample.android.js rename to Examples/UIExplorer/LinkingExample.js index e655bd965..fbf36bfc0 100644 --- a/Examples/UIExplorer/IntentAndroidExample.android.js +++ b/Examples/UIExplorer/LinkingExample.js @@ -15,7 +15,7 @@ var React = require('react-native'); var { - IntentAndroid, + Linking, StyleSheet, Text, TouchableNativeFeedback, @@ -30,9 +30,9 @@ var OpenURLButton = React.createClass({ }, handleClick: function() { - IntentAndroid.canOpenURL(this.props.url, (supported) => { + Linking.canOpenURL(this.props.url).then(supported => { if (supported) { - IntentAndroid.openURL(this.props.url); + Linking.openURL(this.props.url); } else { console.log('Don\'t know how to open URI: ' + this.props.url); } @@ -54,8 +54,8 @@ var OpenURLButton = React.createClass({ var IntentAndroidExample = React.createClass({ statics: { - title: 'IntentAndroid', - description: 'Shows how to use Android Intents to open URLs.', + title: 'Linking', + description: 'Shows how to use Linking to open URLs.', }, render: function() { @@ -64,7 +64,9 @@ var IntentAndroidExample = React.createClass({ + + ); }, diff --git a/Examples/UIExplorer/UIExplorerList.android.js b/Examples/UIExplorer/UIExplorerList.android.js index 321d84a41..78e74c48e 100644 --- a/Examples/UIExplorer/UIExplorerList.android.js +++ b/Examples/UIExplorer/UIExplorerList.android.js @@ -120,14 +120,14 @@ const APIExamples = [ key: 'ImageEditingExample', module: require('./ImageEditingExample'), }, - { - key: 'IntentAndroidExample', - module: require('./IntentAndroidExample'), - }, { key: 'LayoutEventsExample', module: require('./LayoutEventsExample'), }, + { + key: 'LinkingExample', + module: require('./LinkingExample'), + }, { key: 'LayoutExample', module: require('./LayoutExample'), diff --git a/Examples/UIExplorer/UIExplorerList.ios.js b/Examples/UIExplorer/UIExplorerList.ios.js index ae7248430..b2fefd125 100644 --- a/Examples/UIExplorer/UIExplorerList.ios.js +++ b/Examples/UIExplorer/UIExplorerList.ios.js @@ -196,6 +196,10 @@ var APIExamples: Array = [ key: 'LayoutExample', module: require('./LayoutExample'), }, + { + key: 'LinkingExample', + module: require('./LinkingExample'), + }, { key: 'NavigationExperimentalExample', module: require('./NavigationExperimental/NavigationExperimentalExample'),