Gespeicherte Koordinaten für Osmand+-Suche verwenden

Post your questions and help other users.

Moderator: Martin

Post Reply
Jennes
Posts: 21
Joined: 19 May 2017 12:22

Gespeicherte Koordinaten für Osmand+-Suche verwenden

Post by Jennes » 11 Oct 2018 18:49

Hallo miteinander,

mein erster Schritt funktioniert tadellos: Wenn sich BT im Auto und mein S7 trennen, wird via "Inititalisiere Variable Standort" in einer globalen Variable "48.85814,2.29453" gespeichert. Klappt prima und ziemlich exakt bezüglich der Position.

Nur ein kleiner Gedankengang ...: Wenn ich im Android auf dem Bildschirm eine Aktivität anlege, bekomme ich ja alle Apps mit einer Zahl angezeigt und wenn ich die Zahl antippe, klappen alle Möglichkeiten dieser App auf. Bei OSMand+ soll es in meinem Fall diese sein: .activities.search.GeointentActivity - dies startet die Suche innerhalb OSMand+.

mein gewünschter zweiter Schritt klemmt: Um das geparkte Auto wiederzufinden möchte ich gerne meine globale Variable mit dem gespeicherten Standort an diese Aktivität übergeben, bekomme es leider nicht hin. Unter Action / Activity starten, kann ich mit Action, Kategorie Liste und Daten URI leider nichts anfangen ...

Deshalb bitte ich hier um Unterstützung und bedanke mich bereits jetzt dafür.

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Gespeicherte Koordinaten für Osmand+-Suche verwenden

Post by Desmanto » 12 Oct 2018 07:03

As I understand from google translate, you want to pass the variable location which you have saved to glovar, then choose the map app to open it. You can use the example at Start Activity : Google Maps: with coordinates, but uncheck the Explicit Component.

To be exact, you only need 2 fields
Action : android.intent.action.VIEW
Data URI : geo:{global_location,locationformat,decimal}?z=13

Replace the {global_location} with your variable. locationformat is to show the location type variable in different format. In this case we need the decimal. Visit the script documentation for the other locationformat detail.

If you need specific app, check the explicit component and pick the map app you want.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Jennes
Posts: 21
Joined: 19 May 2017 12:22

Re: Gespeicherte Koordinaten für Osmand+-Suche verwenden

Post by Jennes » 12 Oct 2018 08:35

Many thanks, Desmanto!!!

it works great! (The button "examples" I have completely overlooked ...)

Besten Dank :-)

Post Reply