MOVERIO Pro Developer's Guide (Rev.1.4)
106
6.10.
Sample Code
This sample code is for preview data acquisition while displaying a preview at 1080p in
single-through-5m mode.
package jp.epson.moverio.bt2pro.sample.cameratest;
import android.app.Activity;
import android.hardware.Camera;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.WindowManager;
import java.io.IOException;
public class CameraTestActivity extends Activity {
private String TAG = this.getClass().getName();
private Camera camera = null;
private SurfaceHolder mHolder = null;
private byte[] mPreviewData = new byte[1920 * 1080 * 3 / 2];
private byte[] mPreviewBuf = new byte[1920 * 1080 * 3 / 2];
private Object lockObject = new Object();
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_camera_test);
// Full Screen
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
getWindow().addFlags(0x80000000);
// Camera preview
SurfaceView cameraPreview = (SurfaceView) findViewById(R.id.preview);
mHolder = cameraPreview.getHolder();
mHolder.addCallback(previewCallback);
mHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
}
Summary of Contents for Moverio Pro BT-2000
Page 7: ...MOVERIO Pro Developer s Guide Rev 1 4 1 1 Introduction ...
Page 12: ...MOVERIO Pro Developer s Guide Rev 1 4 6 2 Developing Apps ...
Page 30: ...MOVERIO Pro Developer s Guide Rev 1 4 24 3 Display control ...
Page 39: ...MOVERIO Pro Developer s Guide Rev 1 4 33 4 UI control ...
Page 47: ...MOVERIO Pro Developer s Guide Rev 1 4 41 5 Voice commands ...
Page 70: ...MOVERIO Pro Developer s Guide Rev 1 4 64 6 Camera control ...
Page 119: ...MOVERIO Pro Developer s Guide Rev 1 4 113 7 Sensor control ...
Page 127: ...MOVERIO Pro Developer s Guide Rev 1 4 121 8 Bluetooth BLE ...
Page 184: ...MOVERIO Pro Developer s Guide Rev 1 4 178 9 Power control ...
Page 187: ...MOVERIO Pro Developer s Guide Rev 1 4 181 10 Self diagnostic function ...
Page 191: ...MOVERIO Pro Developer s Guide Rev 1 4 185 11 GPS Assist ...
Page 202: ...MOVERIO Pro Developer s Guide Rev 1 4 196 Memo ...