Closed GoogleCodeExporter closed 9 years ago
In version 2.0.4, tracks are now sorted by starting time.
Are you still having issue, can you send a screenshot?
Original comment by jshih@google.com
on 11 Apr 2013 at 6:38
I still have the same problem.
See attached... 2010 items are above yesterday's items.
Original comment by boobietr...@gmail.com
on 11 Apr 2013 at 6:50
You didn't attach the screenshot.
The sorting order is "TracksColumns.STARTTIME DESC"
It is possible that your 2010 items have a STARTTIME that is undefined or
invalid.
Can you export one of these items (in kml format) that is above yesterday's
items and share it.
Thanks
Jimmy
Original comment by jshih@google.com
on 15 Apr 2013 at 8:01
I took every item that was old, yet at the top of my list, and went into
edit mode, then immediately after this I resaved.
This put each item back in chronological order.
Thanks!
Original comment by boobietr...@gmail.com
on 17 Apr 2013 at 10:21
Original comment by jshih@google.com
on 18 Apr 2013 at 5:16
I (and one of my friends) have devices that are also seeing this issue. editing
and saving ~400 tracks is not a feasible workaround for me.
I think I have found the root cause of the problem.
if I'm reading the code correctly, it appears mytracks is sorting not quite by
TracksColumns.STARTTIME DESC
but actually by
TracksColumns.SHAREDWITHME + " ASC, " + TracksColumns.STARTTIME + " DESC"
(at ~line 432 of
MyTracks/src/com/google/android/apps/mytracks/TrackListActivity.java)
and I believe the problem (with my mytracks.db at least) is that old tracks in
the database have SHAREDWITHME of "NULL", wheras on new tracks SHAREDWITHME is
"0".
this difference is causing segregation of old (NULL) tracks from new (0)
tracks. eg. a text .dump of mytracks.db and then some grep/sed/awk shows that
tracks recorded in the order a,b,c,d are displayed by this newer mytracks
version as below:
SHAREDWITHME, STARTTIME, NAME, DESC
-----------------------------------------
NULL, 1362812758601, 2013/03/09 6:05pm, b
NULL, 1362810305318, 2013/03/09 5:25pm, a
... many older tracks here ...
0, 1364356088239, 2013/03/27 2:48pm, d
0, 1364284995008, 2013/03/26 7:03pm, c
the attached patch might fix it, +/- I don't know much java, nor what the usual
values of SHAREDWITHME are supposed to be.
Original comment by plaguedb...@gmail.com
on 22 Apr 2013 at 3:40
Attachments:
Original comment by jshih@google.com
on 22 Apr 2013 at 4:50
I have the same problem, and fixed it with procedure from post #4, thanks.
v2.0.4 and Sony-Ericsson Mini pro
Original comment by j40500...@gmail.com
on 5 May 2013 at 3:43
Thanks. Will be fixed in version 2.0.5. Changed the sql query to
"IFNULL(" + TracksColumns.SHAREDWITHME + ",0) ASC, " + TracksColumns.STARTTIME
+ " DESC"
Original comment by jshih@google.com
on 10 Jun 2013 at 9:08
Issue 1289 has been merged into this issue.
Original comment by jshih@google.com
on 17 Jun 2013 at 8:06
Original issue reported on code.google.com by
boobietr...@gmail.com
on 31 Mar 2013 at 2:05