// Search for deep links
if (Platform.OS === 'android') {
Linking.getInitialURL().then((url) => {
this.navigate(url);
});
} else {
Linking.addEventListener('url', this.handleOpenURL);
}
handleAppStateChange = (nextAppState) => {
if (nextAppState === 'active') {
if (Platform.OS === 'android') {
Linking.getInitialURL().then((url) => {
this.navigate(url);
});
} else {
Linking.addEventListener('url', this.handleOpenURL);
}
}
}
if (Platform.OS === 'android') {
Linking.getInitialURL().then((url) => {
this.navigate(url);
});
} else {
Linking.addEventListener('url', this.handleOpenURL);
}
handleAppStateChange = (nextAppState) => {
if (nextAppState === 'active') {
if (Platform.OS === 'android') {
Linking.getInitialURL().then((url) => {
this.navigate(url);
});
} else {
Linking.addEventListener('url', this.handleOpenURL);
}
}
}