Skip to content

Commit

Permalink
cleaning up a little bit - no diss to Ben, but I rewrote that class
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich Jones committed May 27, 2011
1 parent 7efaca2 commit fe7e9e1
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 22 deletions.
2 changes: 0 additions & 2 deletions src/org/ale/openwatch/DescribeActivity.java
Expand Up @@ -115,7 +115,6 @@ public void run() {
try {
u_service.start();
} catch (RemoteException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

Expand Down Expand Up @@ -151,7 +150,6 @@ public boolean onTouch(View v, MotionEvent event) {
@Override
public void gotLocation(final Location location){
//Got the location!
System.out.println("Got location!");

loc = location;
if (location != null) {
Expand Down
8 changes: 0 additions & 8 deletions src/org/ale/openwatch/MainActivity.java
Expand Up @@ -61,8 +61,6 @@ public class MainActivity extends Activity {

Context c;



@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Expand Down Expand Up @@ -196,7 +194,6 @@ public void onClick(DialogInterface dialog, int whichButton) {
public void run() {
Intent mainIntent = new Intent(c, DescribeActivity.class);
startActivity(mainIntent);
// u_service.start();
}});

finish();
Expand All @@ -209,7 +206,6 @@ public void onClick(DialogInterface dialog, int whichButton) {
alert2.show();
}
} catch (RemoteException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
Expand All @@ -234,7 +230,6 @@ public void run() {
try {
mag.r_service.start();
} catch (RemoteException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
Expand Down Expand Up @@ -285,10 +280,8 @@ public void run() {
case 9:
tag.setImageResource(R.drawable.tag10);
return;


}

}


Expand All @@ -298,7 +291,6 @@ public void setRecorderActivity(RecorderActivity raa) {

public void setParentGroup(MainActivityGroup magg) {
mag = magg;
System.out.println("Parent group set!");
}

public FrameLayout getFL() {
Expand Down
3 changes: 0 additions & 3 deletions src/org/ale/openwatch/VideoRecorder.java
Expand Up @@ -51,8 +51,6 @@ public void setPath(String patha) {
osw.write(path);
osw.flush();
osw.close();
System.out.println("Video path is..");
System.out.println(path);
}catch(IOException e) {
e.printStackTrace();
}
Expand Down Expand Up @@ -116,7 +114,6 @@ public void stop() throws IOException {
recorder.release();
}
catch(Exception e) {
System.out.println("A bad.");
}
}

Expand Down
6 changes: 0 additions & 6 deletions src/org/ale/openwatch/audioRecorder.java
Expand Up @@ -8,9 +8,6 @@
import android.media.MediaRecorder;
import android.os.Environment;

/**
* @author <a href="http://www.benmccann.com">Ben McCann</a>
*/
public class audioRecorder {

final MediaRecorder recorder = new MediaRecorder();
Expand Down Expand Up @@ -56,7 +53,6 @@ public void start() throws IOException {
throw new IOException("Path to file could not be created.");
}


setPath(path);
recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
Expand All @@ -76,8 +72,6 @@ public void setPath(String s) {
osw.write(s);
osw.flush();
osw.close();
System.out.println("Path to file is is..");
System.out.println(s);
}catch(IOException e) {
e.printStackTrace();
}
Expand Down
8 changes: 5 additions & 3 deletions src/org/ale/openwatch/uService.java
Expand Up @@ -101,9 +101,7 @@ public boolean uploading() throws RemoteException {

};

//This method was shamelessly stolen from here:
// http://reecon.wordpress.com/2010/04/25/uploading-files-to-http-server-using-post-android-sdk/
// Thanks, reecon!

public void upload() {
setDataFromPrefs();
setDataFromPath();
Expand All @@ -130,6 +128,10 @@ public void upload() {
// XXX: This is the old way of doing this, simplified by ClientHttpRequest
// but kept here for now, just for reference.

//This method was shamelessly stolen from here:
// http://reecon.wordpress.com/2010/04/25/uploading-files-to-http-server-using-post-android-sdk/
// Thanks, reecon!

// try
// {
// FileInputStream fileInputStream = new FileInputStream(new File(pathToOurFile) );
Expand Down

0 comments on commit fe7e9e1

Please sign in to comment.