diff --git a/phoneClients/javaMe/build/JavaMEPhone1/preprocessed/com/websmithing/gpstracker/GpsHelper.java b/phoneClients/javaMe/build/JavaMEPhone1/preprocessed/com/websmithing/gpstracker/GpsHelper.java index 1b85587..e10bd3a 100644 --- a/phoneClients/javaMe/build/JavaMEPhone1/preprocessed/com/websmithing/gpstracker/GpsHelper.java +++ b/phoneClients/javaMe/build/JavaMEPhone1/preprocessed/com/websmithing/gpstracker/GpsHelper.java @@ -141,18 +141,19 @@ dt=2008-04-17%2012:07:02&lm=0&h=291&w=240&zm=12&dis=25&pn=momosity&sid=11137&acc=95&iv=yes&info=momostuff */ - String gpsData = "lat=" + String.valueOf(qualifiedCoordinates.getLatitude()) - + "&lng=" + String.valueOf(qualifiedCoordinates.getLongitude()) - + "&mph=" + String.valueOf((int)(speed/1609*3600)) // in miles per hour - + "&dir=" + String.valueOf(azimuth) - + "&dt=" + mySqlDateTimeString - + "&lm=" + location.getLocationMethod() - + "&dis=" + String.valueOf((int)(distance/1609)) // in miles - + "&pn=" + midlet.phoneNumber - + "&sid=" + String.valueOf(sessionID) // guid? - + "&acc=" + String.valueOf((int)(qualifiedCoordinates.getHorizontalAccuracy()*3.28)) // in feet - + "&iv=yes" - + "&info=javaMe-" + location.getExtraInfo("text/plain"); + String gpsData = "latitude=" + String.valueOf(qualifiedCoordinates.getLatitude()) + + "&longitude=" + String.valueOf(qualifiedCoordinates.getLongitude()) + + "&speed=" + String.valueOf((int)(speed/1609*3600)) // in miles per hour + + "&direction=" + String.valueOf(azimuth) + + "&date=" + mySqlDateTimeString + + "&locationmethod=" + location.getLocationMethod() + + "&distance=" + String.valueOf((int)(distance/1609)) // in miles + + "&phonenumber=" + midlet.phoneNumber + + "&sessionid=" + String.valueOf(sessionID) // System.currentTimeMillis(); + + "&accuracy=" + String.valueOf((int)(qualifiedCoordinates.getHorizontalAccuracy())) // in meters + + "&locationisvalid=yes" + + "&extrainfo=" + location.getExtraInfo("text/plain") + + "&eventtype=javaMe"; // with our query string built, we create a networker object to send the // gps data to our website and update the DB diff --git a/phoneClients/javaMe/src/com/websmithing/gpstracker/GpsHelper.java b/phoneClients/javaMe/src/com/websmithing/gpstracker/GpsHelper.java index 1b85587..e10bd3a 100644 --- a/phoneClients/javaMe/src/com/websmithing/gpstracker/GpsHelper.java +++ b/phoneClients/javaMe/src/com/websmithing/gpstracker/GpsHelper.java @@ -141,18 +141,19 @@ dt=2008-04-17%2012:07:02&lm=0&h=291&w=240&zm=12&dis=25&pn=momosity&sid=11137&acc=95&iv=yes&info=momostuff */ - String gpsData = "lat=" + String.valueOf(qualifiedCoordinates.getLatitude()) - + "&lng=" + String.valueOf(qualifiedCoordinates.getLongitude()) - + "&mph=" + String.valueOf((int)(speed/1609*3600)) // in miles per hour - + "&dir=" + String.valueOf(azimuth) - + "&dt=" + mySqlDateTimeString - + "&lm=" + location.getLocationMethod() - + "&dis=" + String.valueOf((int)(distance/1609)) // in miles - + "&pn=" + midlet.phoneNumber - + "&sid=" + String.valueOf(sessionID) // guid? - + "&acc=" + String.valueOf((int)(qualifiedCoordinates.getHorizontalAccuracy()*3.28)) // in feet - + "&iv=yes" - + "&info=javaMe-" + location.getExtraInfo("text/plain"); + String gpsData = "latitude=" + String.valueOf(qualifiedCoordinates.getLatitude()) + + "&longitude=" + String.valueOf(qualifiedCoordinates.getLongitude()) + + "&speed=" + String.valueOf((int)(speed/1609*3600)) // in miles per hour + + "&direction=" + String.valueOf(azimuth) + + "&date=" + mySqlDateTimeString + + "&locationmethod=" + location.getLocationMethod() + + "&distance=" + String.valueOf((int)(distance/1609)) // in miles + + "&phonenumber=" + midlet.phoneNumber + + "&sessionid=" + String.valueOf(sessionID) // System.currentTimeMillis(); + + "&accuracy=" + String.valueOf((int)(qualifiedCoordinates.getHorizontalAccuracy())) // in meters + + "&locationisvalid=yes" + + "&extrainfo=" + location.getExtraInfo("text/plain") + + "&eventtype=javaMe"; // with our query string built, we create a networker object to send the // gps data to our website and update the DB diff --git a/phoneClients/windowsPhone/GPSTracker/MainPage.xaml.cs b/phoneClients/windowsPhone/GPSTracker/MainPage.xaml.cs index 8704c34..8d07df6 100644 --- a/phoneClients/windowsPhone/GPSTracker/MainPage.xaml.cs +++ b/phoneClients/windowsPhone/GPSTracker/MainPage.xaml.cs @@ -79,18 +79,19 @@ string defaultUploadWebsite = "http://www.websmithing.com/gpstracker2/getgooglemap3.php"; HttpContent httpContent = new FormUrlEncodedContent(new[] { - new KeyValuePair("lat", latitude), - new KeyValuePair("lng", longitude), - new KeyValuePair("mph", speed), // in miles per hour - new KeyValuePair("dir", direction), - new KeyValuePair("dt", DateTime.Now.ToString(@"yyyy-MM-dd\%20HH:mm:ss")), // formatted for mysql datetime format), - new KeyValuePair("lm", locationMethod), - new KeyValuePair("dis", (totalDistanceInMeters / 1609).ToString("0.0")), // in miles - new KeyValuePair("pn", "momo1"), //Windows.Phone.System.Analytics.HostInformation.PublisherHostId), - new KeyValuePair("sid", sessionID), // guid - new KeyValuePair("acc", accuracy), // in meters - new KeyValuePair("iv", "yes"), - new KeyValuePair("info", "windowsphone-" + httpCount.ToString()) + new KeyValuePair("latitude", latitude), + new KeyValuePair("longitude", longitude), + new KeyValuePair("speed", speed), // in miles per hour + new KeyValuePair("direction", direction), + new KeyValuePair("date", DateTime.Now.ToString(@"yyyy-MM-dd\%20HH:mm:ss")), // formatted for mysql datetime format), + new KeyValuePair("locationmethod", locationMethod), + new KeyValuePair("distance", (totalDistanceInMeters / 1609).ToString("0.0")), // in miles + new KeyValuePair("phonenumber", "momo1"), //Windows.Phone.System.Analytics.HostInformation.PublisherHostId), + new KeyValuePair("sessionid", sessionID), // guid + new KeyValuePair("accuracy", accuracy), // in meters + new KeyValuePair("locationisvalid", "yes"), + new KeyValuePair("extrainfo", "httpCount-" + httpCount.ToString()), + new KeyValuePair("eventtype", "windowsPhone") }); HttpClient httpClient = new HttpClient();