This object is in archive! 
Using sendTrack() to send a track with more than 10,000 points fails.
Solved
I am using ActionDisplayTracks.sendTrack() to export tracks, cue information, and points of interest to Locus Map. I have set extraAction = ActionDisplayVarious.ExtraAction.IMPORT and startNavigation = false. If I create a route with more than 10,000 points the call to sendTrack(), the call returns true but does not launch Locus Map and display the import page as it does with routes created with less than 10,000 points.
Hello Bob,
may you please check logcat? Isn't there something suspicious? Current Android 'Intent' supports data up to 1 MB. So here is a question, if the track you try to send isn't bigger than this value.
Menion
Hello Bob,
may you please check logcat? Isn't there something suspicious? Current Android 'Intent' supports data up to 1 MB. So here is a question, if the track you try to send isn't bigger than this value.
Menion
Hi Menion,
Thanks for the quick response. I don't see anything in Logcat that indicates a problem. The following is the total Logcat output from the point when I create the track to after calling sendTrack(), including the response I got, to when my application has control again.
sendTrack() returned true which I interpret as success.
Bob
Hi Menion,
Thanks for the quick response. I don't see anything in Logcat that indicates a problem. The following is the total Logcat output from the point when I create the track to after calling sendTrack(), including the response I got, to when my application has control again.
sendTrack() returned true which I interpret as success.
Bob
That was an extreme example. I have seen tracks with just over 10,000 (approximately 10,300) fail the same way.
I expected a return value of "false" or an exception to be thrown but not just a return of "true".
That was an extreme example. I have seen tracks with just over 10,000 (approximately 10,300) fail the same way.
I expected a return value of "false" or an exception to be thrown but not just a return of "true".
Hello Bob,
I'm just testing it with API sample app. With a track with 30k trackpoint, I receive the following error in the log
As you may see, this track is too big and even if "sendTrack()" returns true, the system is unable to send an intent with a bundle bigger then 1MB. The correct solution is, like in the case of points, to create a method "sendTrackFile" that will store the track into the filesystem and send to Locus Map only for reference on this file.
Little more work for now. So I suggest keeping the final track Storable below this 1MB limit. Seems that with max. 15k trackpoints, you should be save. Is it acceptable for now?
Menion
Hello Bob,
I'm just testing it with API sample app. With a track with 30k trackpoint, I receive the following error in the log
As you may see, this track is too big and even if "sendTrack()" returns true, the system is unable to send an intent with a bundle bigger then 1MB. The correct solution is, like in the case of points, to create a method "sendTrackFile" that will store the track into the filesystem and send to Locus Map only for reference on this file.
Little more work for now. So I suggest keeping the final track Storable below this 1MB limit. Seems that with max. 15k trackpoints, you should be save. Is it acceptable for now?
Menion
Menion,
I understand the intent 1MB limit and understand there is nothing you can do to work around that. I was assuming that there would be some sort of error indication rather than just a return to my application.
In any case, if I use sendTrackFile() I am forced to convert my data to some file format importable by Locus Map (KML, KMZ, GPZ, TCX, GeoJSON). While generating a GPX file (or any others) is not a problem, I am concerned that I will loose some of the route fidelity I can achieve with sendTrack(). Is there an import format that you feel allows me to achieve the maximum route and point descriptive capability (turn-by-turn nav, segment colors, custom icons, etc)?
For instance, if I selected GPX, is there someplace I can get documentation on the locus extensions?
I've included an example below:
<wpt lat="35.7369480" lon="-79.0003330">
<ele>87.30</ele>
<time>2021-04-04T09:47:54.728Z</time>
<name>Rest Stop - Cruizers</name>
<cmt>Rest Stop - Cruizers</cmt>
<sym>50</sym>
<extensions>
<locus:icon>navig:50</locus:icon>
<locus:rteDistance>6372.0356</locus:rteDistance>
<locus:rtePointAction>pass_place</locus:rtePointAction>
</extensions>
</wpt>
Thanks again
Bob
Menion,
I understand the intent 1MB limit and understand there is nothing you can do to work around that. I was assuming that there would be some sort of error indication rather than just a return to my application.
In any case, if I use sendTrackFile() I am forced to convert my data to some file format importable by Locus Map (KML, KMZ, GPZ, TCX, GeoJSON). While generating a GPX file (or any others) is not a problem, I am concerned that I will loose some of the route fidelity I can achieve with sendTrack(). Is there an import format that you feel allows me to achieve the maximum route and point descriptive capability (turn-by-turn nav, segment colors, custom icons, etc)?
For instance, if I selected GPX, is there someplace I can get documentation on the locus extensions?
I've included an example below:
<wpt lat="35.7369480" lon="-79.0003330">
<ele>87.30</ele>
<time>2021-04-04T09:47:54.728Z</time>
<name>Rest Stop - Cruizers</name>
<cmt>Rest Stop - Cruizers</cmt>
<sym>50</sym>
<extensions>
<locus:icon>navig:50</locus:icon>
<locus:rteDistance>6372.0356</locus:rteDistance>
<locus:rtePointAction>pass_place</locus:rtePointAction>
</extensions>
</wpt>
Thanks again
Bob
Hello Bob,
In the end, I spend almost a day creating a new system for sending tracks to the Locus Map app. Unfortunately, seems that jCenter repository is ending and I have to convert the whole API to MavenCentral. It will take some time (few days) as I already spend too much time on this just before the release of the new version.
Sending over GPX or other format does not make sense. The solution is prepared so count on it. I'll let you know once the new API version will be published.
Menion
Hello Bob,
In the end, I spend almost a day creating a new system for sending tracks to the Locus Map app. Unfortunately, seems that jCenter repository is ending and I have to convert the whole API to MavenCentral. It will take some time (few days) as I already spend too much time on this just before the release of the new version.
Sending over GPX or other format does not make sense. The solution is prepared so count on it. I'll let you know once the new API version will be published.
Menion
Menion,
That's great news. I'll be waiting. Please keep in mind that I am willing to help test before it is released if you want to share with me.
Bob
Menion,
That's great news. I'll be waiting. Please keep in mind that I am willing to help test before it is released if you want to share with me.
Bob
Hello Bob,
so new API + latest app Beta version should work. Check mainly new method how to send tracks here.
Let me know if new methods make sense to you and are working as expected. It is a new system, so nobody uses it yet and we may improve it.
Jiří M. aka Menion
Hello Bob,
so new API + latest app Beta version should work. Check mainly new method how to send tracks here.
Let me know if new methods make sense to you and are working as expected. It is a new system, so nobody uses it yet and we may improve it.
Jiří M. aka Menion
Menion,
Looks like the new call works as advertised. I was able to use the old calls with routes of less than 10,000 points and everything worked as before. I have new routes with in excess of 20,000 points and calls to the new API these now transition as expected. Thanks. Will continue to test and will advise if I find any issues.
BJ
Menion,
Looks like the new call works as advertised. I was able to use the old calls with routes of less than 10,000 points and everything worked as before. I have new routes with in excess of 20,000 points and calls to the new API these now transition as expected. Thanks. Will continue to test and will advise if I find any issues.
BJ
Hello Bob,
perfect. You probably noticed that you may use a new system to prepare the track for send and just use `send` or `sentOverFile` methods. This first one uses the old API in the background so it will work on all Locus Map apps out there.
Jiří M. aka Menion
Hello Bob,
perfect. You probably noticed that you may use a new system to prepare the track for send and just use `send` or `sentOverFile` methods. This first one uses the old API in the background so it will work on all Locus Map apps out there.
Jiří M. aka Menion
Replies have been locked on this page!