dpa99c / react-native-launch-navigator

A React Native module for launching today's most popular navigation/ride apps to navigate to a destination.
143 stars 34 forks source link

Check from app if user navigated successfully? #4

Closed angelos3lex closed 5 years ago

angelos3lex commented 5 years ago

I'm submitting a ...

Callback after navigation succeeds

Thanks in advance!

dpa99c commented 5 years ago

A callback is not possible: once the navigation app is launched, it is now in the foreground and would have to implement a common callback mechanism in its URL scheme, supported by all the other navigation apps, and this does not exist.

Note: There was an attempt to develop a standardized callback mechanism on iOS - the x-callback spec, but it never caught on so it's not very widely supported.

When the navigation app is launched into the foreground, you app is backgrounded. If you wish to continue code execution while your app is background, it will need to use a method of background code execution to do this (e.g. service on Android, Background Modes on iOS). These are out of the scope of this module.

Note: this has also been asked before in the context of this module's sister Cordova/Phonegap plugin: e.g. https://github.com/dpa99c/phonegap-launch-navigator/issues/127