NFC Tools

Locus User shared this question 2 years ago
Answered

I'm trying to trigger an action in Locus from NFC Tools PRO using a broadcast intent as explained here: https://github.com/asamm/locus-api/wiki/Action-tasks-(Broadcasts)#samples

I first tried with Tasker and I was able to do it by simply entering something in the field action and extra.

But the same thing in NFC Tools Pro doesn't work. NFC Tools pro has more fields, each extra has a name and in value (see attached snapshot). I tried filling both of them but without success. Any idea what I'm doing wrong? Or does Locus expect a special name for the extra value?

Replies (2)

photo
1

It was a tedious but I found it out. I observed that the logcat window in Android Studio apparently display the broadcasts that are received by any application and it only says "has extras" when I put a name for the extra too. It also display some conversion error messages from locus. With that help I was able to find a working solution: the extra value must be split into 2 parts with "tasks" as name and the rest (without the ":" at the beginning) as value.

Target = Broadcast

Action = com.asamm.locus.ACTION_TASK

Extra data 1, Name = tasks

Extra data 1, Value = { track_record: { action: "start", name: "Hiking" } }

photo
1

Hi,

to be true, I'm really you found out how it works. I do not know this application so my method will be exactly the same: testing and checking what Locus Map display in log.

Hope it will work now as expected!

Menion

Leave a Comment
 
Attach a file