mirror of
https://github.com/zxing/zxing.git
synced 2025-02-02 05:41:08 -08:00
Extended the test app to write the camera parameters to /sdcard/CameraParameters.txt in addition to emailing them. Also bumped the version to 1.1.
git-svn-id: https://zxing.googlecode.com/svn/trunk@1063 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
965ea2f3fe
commit
77a263dd91
|
@ -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"
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue