For some reason the React Native Linking API's "canOpenURL" method can't detect the Uber app on my device, even though the "openURL" method opens it fine.
Is there something I'm missing below?
constructor(props) {
super(props);
this.state = {
uberURL: 'uber://?client_id=eJCfG86Rz&action=setPickup',
isUberInstalled: false
};
}
componentWillMount() {
Linking.canOpenURL(this.state.uberURL).then(isUberInstalled => {
this.setState({ isUberInstalled: isUberInstalled });
});
}
this.state.isUberInstalled is always false