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 = intent.getLongExtra(getString(R.string.track_id_broadcast_extra), -1);
Once you have the track id then looking up all the details of that track using the My Tracks Library project is trivial (Once you got the user to allow 3rd party apps access).
MyTracksProviderUtils utils = new MyTracksProviderUtilsImpl(this.getContentResolver()); 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.