diff --git a/phoneClients/android/.idea/libraries/android_async_http_1_4_4.xml b/phoneClients/android/.idea/libraries/android_async_http_1_4_4.xml
deleted file mode 100644
index 2b6ac72..0000000
--- a/phoneClients/android/.idea/libraries/android_async_http_1_4_4.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/phoneClients/android/.idea/libraries/android_async_http_1_4_6.xml b/phoneClients/android/.idea/libraries/android_async_http_1_4_6.xml
new file mode 100644
index 0000000..775371d
--- /dev/null
+++ b/phoneClients/android/.idea/libraries/android_async_http_1_4_6.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phoneClients/android/.idea/workspace.xml b/phoneClients/android/.idea/workspace.xml
index 8e04130..801a0b5 100644
--- a/phoneClients/android/.idea/workspace.xml
+++ b/phoneClients/android/.idea/workspace.xml
@@ -41,10 +41,18 @@
+
+
+
-
-
+
+
+
+
+
+
+
@@ -108,14 +116,29 @@
-
+
-
-
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -124,18 +147,18 @@
-
+
-
+
-
-
+
+
@@ -590,7 +613,7 @@
+
+
-
@@ -945,19 +969,19 @@
-
-
-
-
+
+
+
+
-
-
+
+
@@ -1196,7 +1220,7 @@
-
+
@@ -1427,7 +1451,7 @@
-
+
@@ -1443,7 +1467,7 @@
-
+
@@ -1525,7 +1549,8 @@
-
+
+
@@ -1543,7 +1568,8 @@
-
+
+
@@ -1554,7 +1580,8 @@
-
+
+
@@ -1572,7 +1599,8 @@
-
+
+
@@ -1597,7 +1625,8 @@
-
+
+
@@ -1644,7 +1673,11 @@
-
+
+
+
+
+
@@ -1654,7 +1687,8 @@
-
+
+
@@ -1663,7 +1697,11 @@
-
+
+
+
+
+
@@ -1673,7 +1711,8 @@
-
+
+
@@ -1682,7 +1721,11 @@
-
+
+
+
+
+
@@ -1692,7 +1735,8 @@
-
+
+
@@ -1701,7 +1745,11 @@
-
+
+
+
+
+
@@ -1711,7 +1759,8 @@
-
+
+
@@ -1720,7 +1769,11 @@
-
+
+
+
+
+
@@ -1857,14 +1910,6 @@
-
-
-
-
-
-
-
-
@@ -1887,9 +1932,17 @@
+
+
+
+
+
+
+
+
-
+
@@ -1897,39 +1950,44 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/phoneClients/android/app/app.iml b/phoneClients/android/app/app.iml
index 82b2a60..ecd391d 100644
--- a/phoneClients/android/app/app.iml
+++ b/phoneClients/android/app/app.iml
@@ -79,11 +79,11 @@
-
+
diff --git a/phoneClients/android/app/build.gradle b/phoneClients/android/app/build.gradle
index f914464..0a81aa8 100644
--- a/phoneClients/android/app/build.gradle
+++ b/phoneClients/android/app/build.gradle
@@ -8,11 +8,12 @@
applicationId "com.websmithing.gpstracker"
minSdkVersion 10
targetSdkVersion 20
- versionCode 5
- versionName "3.2.5"
+ versionCode 6
+ versionName "3.2.6"
}
buildTypes {
release {
+ debuggable false
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
@@ -22,5 +23,6 @@
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:20.0.0'
+ compile 'com.loopj.android:android-async-http:1.4.6'
compile 'com.google.android.gms:play-services:4.3.23'
}
diff --git a/phoneClients/android/app/libs/android-async-http-1.4.4.jar b/phoneClients/android/app/libs/android-async-http-1.4.4.jar
deleted file mode 100644
index 75af701..0000000
--- a/phoneClients/android/app/libs/android-async-http-1.4.4.jar
+++ /dev/null
Binary files differ
diff --git a/phoneClients/android/app/src/main/java/com/websmithing/gpstracker/GpsTrackerActivity.java b/phoneClients/android/app/src/main/java/com/websmithing/gpstracker/GpsTrackerActivity.java
index 389d923..f2fa838 100644
--- a/phoneClients/android/app/src/main/java/com/websmithing/gpstracker/GpsTrackerActivity.java
+++ b/phoneClients/android/app/src/main/java/com/websmithing/gpstracker/GpsTrackerActivity.java
@@ -133,16 +133,12 @@
}
if (currentlyTracking) {
- Toast.makeText(getApplicationContext(), R.string.tracking_has_now_stopped, Toast.LENGTH_LONG).show();
-
cancelAlarmManager();
currentlyTracking = false;
editor.putBoolean("currentlyTracking", false);
editor.putString("sessionID", "");
} else {
- Toast.makeText(getApplicationContext(), R.string.tracking_has_now_started, Toast.LENGTH_LONG).show();
-
startAlarmManager();
currentlyTracking = true;
@@ -161,10 +157,6 @@
return false;
}
- if (!currentlyTracking) {
- checkIfWebsiteIsReachable();
- }
-
SharedPreferences sharedPreferences = this.getSharedPreferences("com.websmithing.gpstracker.prefs", Context.MODE_PRIVATE);
SharedPreferences.Editor editor = sharedPreferences.edit();
@@ -228,20 +220,6 @@
}
}
- private void checkIfWebsiteIsReachable() {
- LoopjHttpClient.get(defaultUploadWebsite, null, new AsyncHttpResponseHandler() {
- @Override
- public void onSuccess(int statusCode, org.apache.http.Header[] headers, byte[] responseBody) {
- Log.e(TAG, "checkIfWebsiteIsReachable onSuccess statusCode: " + statusCode);
- }
- @Override
- public void onFailure(int statusCode, org.apache.http.Header[] headers, byte[] errorResponse, Throwable e) {
- Toast.makeText(getApplicationContext(), R.string.reachability_error, Toast.LENGTH_LONG).show();
- LoopjHttpClient.debugLoopJ(TAG, "checkIfWebsiteIsReachable", errorResponse, headers, statusCode, e);
- }
- });
- }
-
private void setTrackingButtonState() {
if (currentlyTracking) {
trackingButton.setBackgroundResource(R.drawable.green_tracking_button);
diff --git a/phoneClients/android/app/src/main/res/values/strings.xml b/phoneClients/android/app/src/main/res/values/strings.xml
index 6671915..1c0a4c5 100644
--- a/phoneClients/android/app/src/main/res/values/strings.xml
+++ b/phoneClients/android/app/src/main/res/values/strings.xml
@@ -4,8 +4,6 @@
https://www.websmithing.com/gpstracker2/updatelocation.php
Tracking is Off
Tracking is On
- Tracking has now started.
- Tracking has now stopped.
Please restart tracking to change the time interval.
Cannot reach the website that you have entered. Did you spell it correctly? Does your website use http or https?
Please fill in both fields. User names cannot have a space.
diff --git a/phoneClients/android/build/intermediates/dex-cache/cache.xml b/phoneClients/android/build/intermediates/dex-cache/cache.xml
index c2c12f6..63b6e3c 100644
--- a/phoneClients/android/build/intermediates/dex-cache/cache.xml
+++ b/phoneClients/android/build/intermediates/dex-cache/cache.xml
@@ -2,43 +2,37 @@
-
+
- - PDO::ERRMODE_EXCEPTION,
- PDO::ATTR_EMULATE_PREPARES => false,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC);
$pdo = new PDO('mysql:host=localhost;dbname=gpstracker;charset=utf8', $dbuser, $dbpass, $params);
-if (version_compare(PHP_VERSION, '5.3.6', '<')) {
- $pdo->exec('set names utf8');
-}
-
?>
\ No newline at end of file
diff --git a/servers/php/deleteroute.php b/servers/php/deleteroute.php
index 9f6cd9b..1621067 100644
--- a/servers/php/deleteroute.php
+++ b/servers/php/deleteroute.php
@@ -1,7 +1,10 @@
prepare('CALL prcDeleteRoute(:sessionID, :phoneNumber)');
- $stmt->execute(array(':sessionID' => $_GET['sessionID'], ':phoneNumber' => $_GET['phoneNumber']));
+ $stmt->execute(array(':sessionID' => $sessionid, ':phoneNumber' => $phonenumber));
?>
diff --git a/servers/php/getrouteformap.php b/servers/php/getrouteformap.php
index 651b043..09ae371 100644
--- a/servers/php/getrouteformap.php
+++ b/servers/php/getrouteformap.php
@@ -1,8 +1,11 @@
prepare('CALL prcGetRouteForMap(:sessionID, :phoneNumber)');
- $stmt->execute(array(':sessionID' => $_GET['sessionID'], ':phoneNumber' => $_GET['phoneNumber']));
+ $stmt->execute(array(':sessionID' => $sessionid, ':phoneNumber' => $phonenumber));
$json = '{ "locations": [';
@@ -16,4 +19,6 @@
header('Content-Type: application/json');
echo $json;
+
+ // echo '{ "locations": [] }';
?>
\ No newline at end of file
diff --git a/servers/php/updatelocation.php b/servers/php/updatelocation.php
index e91c4c1..94ae203 100644
--- a/servers/php/updatelocation.php
+++ b/servers/php/updatelocation.php
@@ -1,19 +1,34 @@
$_POST['latitude'],
- ':longitude' => $_POST['longitude'],
- ':speed' => $_POST['speed'],
- ':direction' => $_POST['direction'],
- ':distance' => $_POST['distance'],
- ':date' => urldecode($_POST['date']),
- ':locationmethod' => urldecode($_POST['locationmethod']),
- ':phonenumber' => $_POST['phonenumber'],
- ':sessionid' => $_POST['sessionid'],
- ':accuracy' => $_POST['accuracy'],
- ':extrainfo' => $_POST['extrainfo'],
- ':eventtype' => $_POST['eventtype']
+ $params = array(':latitude' => $latitude,
+ ':longitude' => $longitude,
+ ':speed' => $speed,
+ ':direction' => $direction,
+ ':distance' => $distance,
+ ':date' => $date,
+ ':locationmethod' => $locationmethod,
+ ':phonenumber' => $phonenumber,
+ ':sessionid' => $sessionid,
+ ':accuracy' => $accuracy,
+ ':extrainfo' => $extrainfo,
+ ':eventtype' => $eventtype
);
$stmt = $pdo->prepare('CALL prcSaveGPSLocation(