Intent filter

Started by franc, October 18, 2013, 00:02:34

0 Members and 1 Guest are viewing this topic.

franc

Hello
Can someone please tell me about the intent filter, locus is listening to, when an app handles a location and locus could directly open it on his map?
I found the intent for the search for a location (address or point), but not directly the fixed location.

I want to use the Tasker intent action and here I need exactly the parameter for the android.intent.action and its name.
Didn't find any here in the forum.

Frank
Thanks
Locus Pro - always the actual version on Xiaomi Mi A1 mit Android 9
  •  

Menion

hi,
  which parameters did you tried?

  There is many way, but most simple seems to ve intent "android.intent.action.VIEW" with data like "geo:50.14,18.15

- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

franc

I did:

geo:0,0?q=50.00,10.00

with the android.intent.action.VIEW

this opens a search, would prefer to open directly the point. With your code this works, many thanks menion!!!

frank
Locus Pro - always the actual version on Xiaomi Mi A1 mit Android 9
  •  

Menion

the "q=" usually carry name, so if you set geo to 0,0, I use "q" to search for a name. If you set geo to some coordinates and "q=myName" locus then creates waypoint at certain coordinates with name defined in "q" ... at least I hope :)
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

franc

geo:%LOCN?q=NameOfPoint

Doesn't set the name.
Locus Pro - always the actual version on Xiaomi Mi A1 mit Android 9
  •  

Menion

ah sorry, my mistake. It do not work in Locus in this way. If geo is set to 0,0, then "q=X" parameter is used for "Address search", not for name. To set name, it's needed to insert to intent another parameter name"
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

franc

Quote from: menion on October 23, 2013, 07:21:34
...To set name, it's needed to insert to intent another parameter name
Which one?
Or do you mean this parameter is not yet in locus available?
Locus Pro - always the actual version on Xiaomi Mi A1 mit Android 9
  •  

Menion

I do not know what you may define if you send intent. In my previous post, I miss one quote. I wanted to wrote

To set name, it's needed to insert to intent another parameter "name"
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

franc

Quote from: menion on October 23, 2013, 08:38:13
... I wanted to wrote: To set name, it's needed to insert to intent another parameter "name"
Ah! I thought the ending quote was an error, so I omitted it, when quoting your comment :)

So:

geo:%LOCN?name=NameOfPoint

(where %LOCN is my location)
would do it?

Locus Pro - always the actual version on Xiaomi Mi A1 mit Android 9
  •  

Menion

nonono, you define intent type on "android.intent.action.VIEW", then you define data to "geo:..." and if Tasker allow it, you should add also another parameter "name" and value is name of your point.

I never used tasker so I cannot help here
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

franc

Quote from: menion on October 23, 2013, 09:16:53
...and if Tasker allow it, you should add also another parameter "name" and value is name of your point...
Yeppo!
Works!
Tasker has two extra Data fields to use, see:

http://tasker.dinglisch.net/userguide/en/intents.html

Separation of name and value is with ":"
So I just put it to the first "Extra":

name:%myPlaceName
(where %myPlaceName is the name I want to give to the new POI, coming from my tasker script)

Is there a way to make this point permanent as well?
At the moment I just copy the new point manually to my points folder in locus.
If I don't do this, the new point (with the name of %myPlaceName) is gone on the next start of Locus, which is normal and useful behaviour, though!
Maybe another parameter to copy it to some folder (favorites e.g.)?
Not too important, though.

Locus Pro - always the actual version on Xiaomi Mi A1 mit Android 9
  •  

Menion

perfect ...

currently, there is no additional parameter. It's just few clicks ... tap on first "+" button, then choose folder and press "OK", Done ;)
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

franc

OK, great, thank you!
Locus Pro - always the actual version on Xiaomi Mi A1 mit Android 9
  •