question: public void writeGpxFile ( String trackName , DBtrackingPoints db , File gpxFile ) throws IOException { String METADATA = "  <metadata>\n" + "    <link href=\"http://JunjunGuo.com/PocketMaps\">\n" + "      <text>Pocket Maps: Free offline maps with routing functions and more</text>\n" + "    </link>\n" + "    <time>" + DF . format ( System . currentTimeMillis ( ) ) + "</time>\n" + "  </metadata>" ; if ( ! gpxFile . exists ( ) ) { gpxFile . createNewFile ( ) ; } FileWriter fw = new FileWriter ( gpxFile ) ; fw . write ( XML_HEADER + "\n" ) ; fw . write ( TAG_GPX + "\n" ) ; fw . write ( METADATA + "\n" ) ; writeTrackPoints ( trackName , fw , db ) ; fw . write ( "</gpx>" ) ; fw . close ( ) ; }
target:  Writes the GPX file