0.0.1 • Published 2 years ago

react-native-alexa-linking v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

react-native-alexa-linking

React Native module for Alexa App-to-App Linking

Install

$ npm i git://github.com/chadsmith/react-native-alexa-linking.git
$ react-native link react-native-alexa-linking

Usage

import AlexaLinking from 'react-native-alexa-linking';

// Get Alexa app URL and LWA fallback URL from your service
const links = await MyService.getAlexaURLs();

// Method 1: Open appURL if Alexa app is installed, otherwise open fallbackURL
AlexaLinking.openURL(links.appURL, links.fallbackURL);

// Method 2: Open Alexa app if installed, otherwise handle fallback on your own
AlexaLinking.openURL(links.appURL).then(appOpened => {
  // load fallbackURL in webview if !appOpened
});