Locus Map - forum

Support => Troubles & Questions => Topic started by: franc on October 18, 2013, 00:02:34

Title: Intent filter
Post by: franc on October 18, 2013, 00:02:34
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
Title: Re: Intent filter
Post by: Menion on October 18, 2013, 07:38:43
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

Title: Re: Intent filter
Post by: franc on October 18, 2013, 08:08:31
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
Title: Re: Intent filter
Post by: Menion on October 18, 2013, 08:28:48
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 :)
Title: Re: Intent filter
Post by: franc on October 21, 2013, 23:05:59
geo:%LOCN?q=NameOfPoint

Doesn't set the name.
Title: Re: Intent filter
Post by: Menion on October 23, 2013, 07:21:34
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"
Title: Re: Intent filter
Post by: franc on October 23, 2013, 08:36:05
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?
Title: Re: Intent filter
Post by: Menion on October 23, 2013, 08:38:13
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"
Title: Re: Intent filter
Post by: franc on October 23, 2013, 09:10:46
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?

Title: Re: Intent filter
Post by: Menion on October 23, 2013, 09:16:53
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
Title: Re: Intent filter
Post by: franc on October 23, 2013, 09:27:28
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.

Title: Re: Intent filter
Post by: Menion on October 23, 2013, 09:36:53
perfect ...

currently, there is no additional parameter. It's just few clicks ... tap on first "+" button, then choose folder and press "OK", Done ;)
Title: Re: Intent filter
Post by: franc on October 23, 2013, 09:47:28
OK, great, thank you!