**WARN Possible Unhandled Promise Rejection (id: 1):
Error: Could not open URL 'htttps://www.google.com/dir/?api=1&destination=31.45166,74.29813': No Activity found to handle Intent { act=android.intent.action.VIEW dat=htttps://www.google.com/dir/?api=1&destination=31.45166,74.29813 flg=0x10000000 }**
acceptPassengerRequest() {
//Send Driver Location to Passenger
this.socket.emit('driverLocation', {
latitude: this.state.latitude,
longitude: this.state.longitude,
});
const passengerLocation = this.state.pointCoords[
this.state.pointCoords.length - 1
];
if (Platform.OS === 'ios') {
Linking.openURL(
`http://maps.apple.com/?daddr=${passengerLocation.latitude},${passengerLocation.longitude}`,
);
} else {
Linking.openURL(
`htttps://www.google.com/dir/?api=1&destination=${passengerLocation.latitude},${passengerLocation.longitude}`,
);
}
User contributions licensed under CC BY-SA 3.0