DefinitelyTyped/types/react-native-app-link/react-native-app-link-tests.ts
2019-04-15 17:12:02 +01:00

38 lines
816 B
TypeScript

import AppLink, { maybeOpenURL, openInStore } from 'react-native-app-link';
AppLink.maybeOpenURL('instagram://user?username=microsoft', {
appName: 'instagram',
appStoreId: 389801252,
appStoreLocale: 'gb',
playStoreId: 'com.instagram.android'
}).then(() => {
// do stuff
});
maybeOpenURL('instagram://user?username=microsoft', {
appName: 'instagram',
appStoreId: 389801252,
appStoreLocale: 'gb',
playStoreId: 'com.instagram.android'
}).then(() => {
// do stuff
});
AppLink.openInStore({
appName: 'whatsapp-messenger',
appStoreId: 310633997,
appStoreLocale: 'gb',
playStoreId: 'com.whatsapp'
}).then(() => {
// do stuff
});
openInStore({
appName: 'whatsapp-messenger',
appStoreId: 310633997,
appStoreLocale: 'gb',
playStoreId: 'com.whatsapp'
}).then(() => {
// do stuff
});