Extended the test app to write the camera parameters to /sdcard/CameraParameters...
authordswitkin <dswitkin@59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Fri, 25 Sep 2009 21:38:26 +0000 (21:38 +0000)
committerdswitkin <dswitkin@59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Fri, 25 Sep 2009 21:38:26 +0000 (21:38 +0000)
git-svn-id: http://zxing.googlecode.com/svn/trunk@1063 59b500cc-1b3d-0410-9834-0bbf25fbcc57

androidtest/AndroidManifest.xml
androidtest/src/com/google/zxing/client/androidtest/CameraTestActivity.java

index f443b8f..93dd2f5 100755 (executable)
@@ -16,8 +16,8 @@
  -->
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
           package="com.google.zxing.client.androidtest"
-          android:versionName="1.0"
-          android:versionCode="1">
+          android:versionName="1.1"
+          android:versionCode="2">
   <uses-sdk android:minSdkVersion="3"/>
   <application android:label="@string/app_name"
                android:icon="@drawable/icon"
index bc41a8c..89d6dbd 100755 (executable)
@@ -29,7 +29,10 @@ import android.view.Window;
 import android.view.WindowManager;
 import android.widget.Toast;
 
+import java.io.File;
+import java.io.FileOutputStream;
 import java.io.IOException;
+import java.io.FileNotFoundException;
 
 public final class CameraTestActivity extends Activity implements SurfaceHolder.Callback {
 
@@ -181,12 +184,24 @@ public final class CameraTestActivity extends Activity implements SurfaceHolder.
     result.append("\n\n");
     result.append(parameters);
 
+    File file = new File("/sdcard/CameraParameters.txt");
+    try {
+      FileOutputStream stream = new FileOutputStream(file);
+      stream.write(result.toString().getBytes());
+      stream.close();
+    } catch (FileNotFoundException e) {
+
+    } catch (IOException e) {
+
+    }
+
     Intent intent = new Intent(Intent.ACTION_SEND);
     intent.putExtra(Intent.EXTRA_EMAIL, EMAIL_ADDRESS);
     intent.putExtra(Intent.EXTRA_SUBJECT, "Camera parameters report");
     intent.putExtra(Intent.EXTRA_TEXT, result.toString());
     intent.setType("text/plain");
     startActivity(intent);
+    finish();
   }
 
 }