After my last My Tracks patch had to be pulled (to be honest it did break sharing routes by anything other than Tracks2Miles) a new (safe) patch was accepted a few days ago.
This patch passes just the My Tracks track id along with the URL for the exported file in the SHARE intent. The key for the extra reuses the same key that is used by the My Tracks library when sending Broadcasts on starting and stopping recording a new track. The track id can be recovered from the intent with the following code:
long track_id =
MyTracksProviderUtils utils =
Track track = utils.getTrack(track_id);
TripStatistics stats = track.getStatistics();
double totalDistance = stats.getTotalDistance();
long movingTime = stats.getMovingTime();
String cat = track.getCategory();
String desc = track.getDescription();
long lastLocId = utils.getLastLocationId(track_id);
Location loc = utils.getLocation(lastLocId);
The latest version of Tracks2TitanXT has already been updated to use this method and Tracks2Miles will get an update for this as well as some better tablet support before the next version of My Tracks ships.