Skip to content
This repository has been archived by the owner on Mar 17, 2019. It is now read-only.

Pictures app no longer fails to upload on some devices, Datawalk no longer crashes on Freds Galaxy note #1105

Merged
merged 10 commits into from
Jun 26, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .DS_Store
Binary file not shown.
Binary file modified Android/.DS_Store
Binary file not shown.
Binary file modified Android/.gradle/1.12/taskArtifacts/cache.properties.lock
Binary file not shown.
Binary file modified Android/.gradle/1.12/taskArtifacts/fileHashes.bin
Binary file not shown.
Binary file modified Android/.gradle/1.12/taskArtifacts/fileSnapshots.bin
Binary file not shown.
Binary file modified Android/.gradle/1.12/taskArtifacts/outputFileStates.bin
Binary file not shown.
Binary file modified Android/.gradle/1.12/taskArtifacts/taskArtifacts.bin
Binary file not shown.
3 changes: 1 addition & 2 deletions Android/CanobieTest/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="edu.uml.cs.isense.canobiev2.test"
android:versionCode="1"
android:versionName="1.0"
android:sharedUserId='edu.uml.cs.isense'>
android:versionName="1.0" >

<uses-sdk android:minSdkVersion="11" />

Expand Down
3 changes: 1 addition & 2 deletions Android/Canobie_Physics_v2/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="edu.uml.cs.isense.canobiev2"
android:versionCode="10"
android:versionName="2.2"
android:sharedUserId='edu.uml.cs.isense'>
android:versionName="2.2" >

<uses-sdk
android:minSdkVersion="11"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ public final class BuildConfig {
public static final String PACKAGE_NAME = "edu.uml.cs.isense.canobiev2";
public static final String BUILD_TYPE = "debug";
public static final String FLAVOR = "";
public static final int VERSION_CODE = 12;
public static final int VERSION_CODE = 10;
public static final String VERSION_NAME = "";
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="edu.uml.cs.isense.canobiev2"
android:sharedUserId="edu.uml.cs.isense"
android:versionCode="12"
android:versionName="2.2.2" >
android:versionCode="10"
android:versionName="2.2" >

<uses-sdk
android:minSdkVersion="11"
Expand Down
2 changes: 1 addition & 1 deletion Android/CarRampTestProject/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="edu.uml.cs.isense.carphysicsv2.test"
android:versionCode="1"
android:versionName="1.0" android:sharedUserId='edu.uml.cs.isense'>
android:versionName="1.0" >

<uses-sdk android:minSdkVersion="9" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

public class Test extends ActivityInstrumentationTestCase2<CarRampPhysicsV2> {
Solo solo;
int a;

public Test() {
super(CarRampPhysicsV2.class);
Expand Down
4 changes: 1 addition & 3 deletions Android/Car_Ramp_Physics/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
package="edu.uml.cs.isense.carphysicsv2"
android:versionCode="23"
android:versionName="3.1.3"
android:sharedUserId="edu.uml.cs.isense">
android:versionName="3.1.3">

<uses-sdk
android:minSdkVersion="9"
Expand All @@ -29,7 +28,6 @@
android:theme="@style/AppTheme" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="edu.uml.cs.isense.carphysicsv2"
android:sharedUserId="edu.uml.cs.isense"
android:versionCode="23"
android:versionName="3.1.3" >

Expand All @@ -13,6 +12,10 @@
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

<instrumentation
android:name="android.test.InstrumentationTestRunner"
android:targetPackage="edu.uml.cs.isense.carphysicsv2" />

<activity
android:name="edu.uml.cs.isense.queue.QueueLayout"
android:label="Upload Data"
Expand Down
3 changes: 1 addition & 2 deletions Android/DataWalk/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
package="edu.uml.cs.isense.datawalk_v2"
android:versionCode="23"
android:versionName="2.5.1"
android:sharedUserId="edu.uml.cs.isense">
android:versionName="2.5.1">

<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.INTERNET" />
Expand Down
Binary file modified Android/DataWalk/build/intermediates/libs/DataWalk-debug.ap_
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="edu.uml.cs.isense.datawalk_v2"
android:sharedUserId="edu.uml.cs.isense"
android:versionCode="23"
android:versionName="2.5.1" >

Expand Down
11 changes: 6 additions & 5 deletions Android/DataWalk/src/edu/uml/cs/isense/datawalk_v2/DataWalk.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,12 @@ public class DataWalk extends Activity implements LocationListener,
private Waffle w;

/* iSENSE API Globals and Constants */
private final String DEFAULT_PROJECT = "5";
private final String DEFAULT_PROJECT_DEV = "5";
private final String DEFAULT_PROJECT = "13";
private final String DEFAULT_PROJECT_DEV = "13";

private int actionBarTapCount = 0;
public static boolean useDev = false;
public static String projectID = "5";
public static String projectID = "13";

private String loginName = "";
private String loginPass = "";
Expand Down Expand Up @@ -283,10 +283,11 @@ public boolean onLongClick(View arg0) {
if (Datawalk_Service.running) {
setLayoutNotRecording();
stopService(service);
} else if (!Datawalk_Service.running && gpsWorking ) { //&& gpsWorking ) {
} else if (!Datawalk_Service.running && gpsWorking &&
(loc.getLatitude() != 0 && loc.getLongitude() != 0) ) {
setLayoutRecording();
startService(service);
} else if (!gpsWorking) {
} else if (!gpsWorking || (loc.getLatitude() != 0 && loc.getLongitude() != 0) ) {
w.make("No GPS Signal", Waffle.LENGTH_LONG, Waffle.IMAGE_X);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,7 @@ public void onCreate() {

initLocationManager();

//MySensorListener is an object of the class I made down below
sensorListener = new MySensorListener();

// Start the sensor manager so we can get accelerometer data
mSensorManager.registerListener(sensorListener,
mSensorManager.getDefaultSensor(Sensor.TYPE_LINEAR_ACCELERATION),
SensorManager.SENSOR_DELAY_FASTEST);

initSensorManager();

broadcaster = LocalBroadcastManager.getInstance(this);

Expand Down Expand Up @@ -446,6 +439,20 @@ private void initLocationManager() {
firstLoc = loc;
}

private void initSensorManager() {
//MySensorListener is an object of the class I made down below
sensorListener = new MySensorListener();

Log.e("Datawalk Service: ", "about to try and register SensorManger");

// Start the sensor manager so we can get accelerometer data
mSensorManager.registerListener(sensorListener,
mSensorManager.getDefaultSensor(Sensor.TYPE_LINEAR_ACCELERATION),
SensorManager.SENSOR_DELAY_FASTEST);


}

// formats numbers to 2 decimal points
double roundTwoDecimals(double d) {
DecimalFormat twoDForm = new DecimalFormat("#.##");
Expand Down Expand Up @@ -501,14 +508,19 @@ public class MySensorListener implements SensorEventListener {

@Override
public void onSensorChanged(SensorEvent event) {
Log.e("onSensorChanged ", "here");
// Log.e("onSensorChanged ", "here");

if (event.sensor.getType() == Sensor.TYPE_LINEAR_ACCELERATION) {
accel[0] = event.values[0];
accel[1] = event.values[1];
accel[2] = event.values[2];
accel[3] = (float) Math.sqrt((float) (Math.pow(accel[0], 2)
+ Math.pow(accel[1], 2) + Math.pow(accel[2], 2)));
try {
accel[0] = event.values[0];
accel[1] = event.values[1];
accel[2] = event.values[2];
accel[3] = (float) Math.sqrt((float) (Math.pow(accel[0], 2)
+ Math.pow(accel[1], 2) + Math.pow(accel[2], 2)));
} catch (Exception e) {
e.printStackTrace();
}

}

}
Expand Down
3 changes: 1 addition & 2 deletions Android/Data_Collector/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
package="edu.uml.cs.isense.collector"
android:versionCode="36"
android:versionName="4.1.2"
android:sharedUserId="edu.uml.cs.isense">
android:versionName="4.1.2">

<uses-sdk
android:minSdkVersion="9"
Expand Down
Binary file modified Android/Google_Play_APK_Files/.DS_Store
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
3 changes: 1 addition & 2 deletions Android/PendulumTracker/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="edu.uml.cs.isense.pendulum"
android:versionCode="26"
android:versionName="2.1.4"
android:sharedUserId="edu.uml.cs.isense">
android:versionName="2.1.4">

<uses-sdk
android:minSdkVersion="11"
Expand Down
3 changes: 1 addition & 2 deletions Android/Pictures/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="edu.uml.cs.isense.riverwalk"
android:versionCode="10"
android:versionName="2.2.2"
android:sharedUserId="edu.uml.cs.isense">
android:versionName="2.2.2">

<uses-sdk
android:minSdkVersion="11"
Expand Down
51 changes: 31 additions & 20 deletions Android/Pictures/src/edu/uml/cs/isense/riverwalk/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@ public class Main extends Activity implements LocationListener {
private static Camera mCamera;
private CameraPreview mPreview;
private FrameLayout preview;


Boolean validPicture = false;

@SuppressLint("NewApi")
@Override
public void onCreate(Bundle savedInstanceState) {
Expand Down Expand Up @@ -293,7 +295,7 @@ public void onClick(View v) {
});


/* Add a Picture to upload queue from gallery */
/* Add a Picture to queue from gallery */
addPicture.setOnClickListener(new OnClickListener() {

@Override
Expand Down Expand Up @@ -412,38 +414,47 @@ protected Boolean doInBackground(Void... params) {
runOnUiThread(new Runnable() {
public void run() {
try {
mCamera.takePicture(null, null, mPicture); // takes
mCamera.enableShutterSound(true);
mCamera.takePicture(null, null, mPicture); // takes
// a
// picture
} catch (Exception e) {
Log.d("CameraMain", "Failed taking picture");
e.printStackTrace();
}

if (picture != null) {
Log.d("CameraMain",
"Successfully captured picture.");
}
}
if (picture != null) {
validPicture = true;
} else {
w.make("Picture is Null", Waffle.LENGTH_SHORT,
Waffle.IMAGE_X);
validPicture = false;
}

}
});
//set curTime lat and long before running upload task

if (validPicture) {

//set curTime lat and long before running upload task
curTime = System.currentTimeMillis();
lat = loc.getLatitude();
lon = loc.getLongitude();
uploader.run();
uq.buildQueueFromFile();

runOnUiThread(new Runnable() {
public void run() {
w.make("Picture saved!", Waffle.LENGTH_SHORT,
Waffle.IMAGE_CHECK);
queueCount.setText(getResources().getString(
R.string.queueCount)
+ uq.queueSize());
mCamera.stopPreview();
mCamera.startPreview();
}
});
runOnUiThread(new Runnable() {
public void run() {
w.make("Picture saved!", Waffle.LENGTH_SHORT,
Waffle.IMAGE_CHECK);
queueCount.setText(getResources().getString(
R.string.queueCount)
+ uq.queueSize());
mCamera.stopPreview();
mCamera.startPreview();
}
});
}

} else {
return null;
Expand Down
15 changes: 15 additions & 0 deletions Android/SetupTestProjectsReadMe.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf200
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
\margl1440\margr1440\vieww10800\viewh8400\viewkind0
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural

\f0\fs24 \cf0 First time setup of Android Test Projects\
\
1. Must be using Eclipse (Does not work with Android Studio)\
\
2. Add Robotium jar file from isense imports lib folder to the test projects build path\
Right click test project -> build path -> Configure Build Path -> Libraries tab -> add JARs button on right -> jar is found in isenseimports project in lib folder\
\
3. In the build path window of the test project, under the projects tab, add the app that that is being tested. \
Right click test project -> build path -> Configure Build Path -> Projects tab -> add button on right -> add Project that is being tested}
14 changes: 7 additions & 7 deletions Android/build/intermediates/dex-cache/cache.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
<pre-dex-items>

<item
dex="/Users/bobbydonald/iSENSE-Hardware/Android/Pictures/build/intermediates/pre-dexed/debug/android-support-v4-36231bad5d4e7cee554a3e912d3893a6feed0bba.jar"
jar="/Users/bobbydonald/iSENSE-Hardware/Android/build/intermediates/exploded-aar/Android/iSENSE Imports/unspecified/libs/android-support-v4.jar"
dex="/Users/bobbydonald/iSENSE-Hardware/Android/Car_Ramp_Physics/build/intermediates/pre-dexed/debug/classes-6be2748b05fa77a5896f90674ca7e24be55266dd.jar"
jar="/Users/bobbydonald/iSENSE-Hardware/Android/build/intermediates/exploded-aar/Android/iSENSE Imports/unspecified/classes.jar"
jumboMode="false"
revision="19.1.0"
sha1="5896b0a4e377ac4242eb2bc785220c1c4fc052f4"/>
sha1="472e440d744dcc2ddbbdecfd989a10c177422272"/>
<item
dex="/Users/bobbydonald/iSENSE-Hardware/Android/Pictures/build/intermediates/pre-dexed/debug/classes-6be2748b05fa77a5896f90674ca7e24be55266dd.jar"
jar="/Users/bobbydonald/iSENSE-Hardware/Android/build/intermediates/exploded-aar/Android/iSENSE Imports/unspecified/classes.jar"
dex="/Users/bobbydonald/iSENSE-Hardware/Android/Car_Ramp_Physics/build/intermediates/pre-dexed/debug/android-support-v4-36231bad5d4e7cee554a3e912d3893a6feed0bba.jar"
jar="/Users/bobbydonald/iSENSE-Hardware/Android/build/intermediates/exploded-aar/Android/iSENSE Imports/unspecified/libs/android-support-v4.jar"
jumboMode="false"
revision="19.1.0"
sha1="2918620337d0cfb87dd80e0f4acf68e3bc2e0aa3"/>
sha1="5896b0a4e377ac4242eb2bc785220c1c4fc052f4"/>
<item
dex="/Users/bobbydonald/iSENSE-Hardware/Android/Pictures/build/intermediates/pre-dexed/debug/httpmime-4.2.5-92627dde54df50d8864b97f5f66afcb53fb700aa.jar"
dex="/Users/bobbydonald/iSENSE-Hardware/Android/Car_Ramp_Physics/build/intermediates/pre-dexed/debug/httpmime-4.2.5-92627dde54df50d8864b97f5f66afcb53fb700aa.jar"
jar="/Users/bobbydonald/iSENSE-Hardware/Android/build/intermediates/exploded-aar/Android/iSENSE Imports/unspecified/libs/httpmime-4.2.5.jar"
jumboMode="false"
revision="19.1.0"
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="edu.uml.cs.isense"
android:sharedUserId="edu.uml.cs.isense"
android:versionCode="4"
android:versionName="4.1" >

Expand Down
Binary file not shown.
3 changes: 1 addition & 2 deletions Android/iSENSE Imports/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="edu.uml.cs.isense"
android:versionCode="4"
android:versionName="4.1"
android:sharedUserId="edu.uml.cs.isense">
android:versionName="4.1">

<uses-sdk
android:minSdkVersion="9"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="edu.uml.cs.isense"
android:sharedUserId="edu.uml.cs.isense"
android:versionCode="4"
android:versionName="4.1" >

Expand Down
Binary file not shown.
Binary file modified Android/iSENSE Imports/build/outputs/aar/iSENSE Imports.aar
Binary file not shown.
Loading