If you ONLY want to generate a GPX file from a list of geopoints, the simplest way would be to just blast strings into a file. Not knowing the exact format of GPX, I'm making a lot of the details up, but you should know the format you're generating.
For Example, in pseudocode:
// open file handle
OutputStream fout = getFileOutputStream("gpxFile.gpx");
fout.write("<gpx>");
for (GeoPoint gp : listOfGeoPoints) {
fout.write("<gpxPoint>" + getGeoPointAsStringForFile(gp) + "</gpxPoint>");
}
fout.write("</gpx>");
// close file, cleanup, etc
This would require you to implement the getFIleOutputStream() method and the getGeoPointAsStringForFile() method, but you know what format you're aiming for, and this'll let you just create the file without having to go through a lot of hoops.
- It should be noted that this is incredibly fragile, so do it the right way before you go live, but this is a short version quick fix.