Back to project page location-data.
The source code is released under:
GNU General Public License
If you think the Android project location-data listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.example.locationtracker; /*from w w w . j a va 2 s . c o m*/ import java.util.Date; public class GeoLocation { public String timestamp; public double latitude; public double longitude; GeoLocation(String timestamp, double latitude, double longitude) { this.timestamp = timestamp; this.latitude = latitude; this.longitude = longitude; } GeoLocation(double latitude, double longitude) { this.timestamp = this.getNow(); this.latitude = latitude; this.longitude = longitude; } @Override public String toString() { return String.valueOf(this.latitude) + ", " + String.valueOf(this.longitude) + " [" + this.timestamp + "]"; } private String getNow() { Date date = new Date(); return String.valueOf(date.getTime()); } }