-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add/Android Supporting sending & receiving geo: intents #812
Conversation
…s_geo() And fixing the example strings to match what is actually output by the function
…rmat And add internal coord_format_with_sep() to specify the separator
…d of coordinates_geo()
…rt format in pcoord_format_short() and coord_geo_format_short()
…coord-in-location-click-contextual-menu
…coord-in-location-click-contextual-menu
…coord-in-location-click-contextual-menu
…coord-in-location-click-contextual-menu
Hi @jandegr, I could not reproduce the issue, but I'm sure I've noticed before this feeling of multiple instances running. |
Actually, I just reproduced the issue on a Samsung device running Android 4.4.2. |
And I also restested the intent loopback issue (crash) after I rebased on the code from trunk including PR877 and it did not crash. So, I think you already fixed the crash in that PR. |
I will take some time to test it soon, but even without testing I suspect it now indeed sticks to being a singleton, but since you did not implement onNewIntent(), it will just recreate navit and that is not what we want. I might be wrong, but I just think it will now show in the log it takes the onCreate() route (or maybe, but probably not, the onRestart() route) since you don't open the onNewIntent entrypoint. At least it is what the API makes me think. THX |
I did some additional testing, and the execution flow actually doesn't go through When navit is initially started from a geo intent, the sequence is:
But when navit is already running and resumed with a new geo intent, we go through:
But does not take the intent into account... it keeps the previous destination, if any, so the intent reception feature is actually not working properly anymore. To be continued... |
I have tested on this new code and receiving a geo intent now works as expected (starts navigating to the coordinates provided) even when navit is already running. I am already planning to build some future work on this code base, opening a contextual menu based on the geolocation extracted from the intent, so that the exact action to perform on the input coordinates can be selected by the user, exactly the same way as when coordinates are input using the Action>Coordinates menu in the internal GUI... @jandegr already told me sending geo intents is working but I fixed receiving geo intents since then, so I'd be happy if someone can test and give me feedback on this feature. Shall I merge? Thanks! |
Hi, your choice. |
@lains pls. merge this since future work depends on it. THX |
This PR adds 2 features to navit for Android:
When a geo: intent is started on Android, for example by scanning a geo QR code, navit is able to takes these coordinates as input
When a specific point is clicked on the map, this PR adds a new item in the contextual menu: "View". By clicking on that item (and if there are applications to handle it) a geo intent is generated in Android