What's the usage of setExtraCallback method in Waypoint class?

Carlos Vela shared this question 14 months ago
Answered

I read the following in the method class documentation: This appear when you click on point and then under last button will be your button.

I was wondering if this methos adds a custom button on the popup shown when just touching a waypoint. Is it right?

Comments (3)

photo
1

Good day Carlos,

this is little-outdated description as I see, anyway system is still the same.

This method truly adds a button to point, but it will appear not directly in the popup on the map, but in the bottom toolbar in point detail screen under "Share" button. Click on button then start intent on the defined package with defined parameter & it's value.

Better?

photo
1

Is this still working? I tried this on Points, that i create over the API, but there is no additional point on the "Share" Button.

Is there anything beside to think about?

photo
1

Hello Hubert,

I've just added this call to sample app here and found out that it really does not work. The tiny issue in API that caused Locus Map mallfunction, hmm.


API currently generate following string

String value = TAG_EXTRA_CALLBACK;My button;com.asamm.locus.api.sample;com.asamm.locus.api.sample.MainActivity;extraCallbackId;id01;;
And then add it to the point as

point.addParameter(GeoDataExtra.PAR_INTENT_EXTRA_CALLBACK, value);
Problem is the end of generated value ... two semicolons.


So you may try these two steps manually. The correct value should look like this

String value = TAG_EXTRA_CALLBACK;My button;com.asamm.locus.api.sample;com.asamm.locus.api.sample.MainActivity;extraCallbackId;id01


Then I'm sure, it will work. Let me know if it helped.

photo
1

Hello Menion,


Yes, this helps. It is working. Thanks a lot.

photo