@SuppressWarnings("deprecation")
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    activity = this;
    setContentView(R.layout.activity_camera);
    mSurfaceView = (SurfaceView) findViewById(R.id.previewSurface);
    CompoundTouchListener compoundTouch = new CompoundTouchListener();
    compoundTouch.addTouchListener(
        new TouchZoomControl(
            this, ScreenDimension.getScreenWidth(this), ScreenDimension.getScreenHeight(this)));
    mSurfaceView.setOnTouchListener(compoundTouch);
    mHolder = mSurfaceView.getHolder();
    mHolder.addCallback(mCallback);
    mHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
    zoomText = (TextView) findViewById(R.id.zoomtext);
    // RotateAnimation rotate=
    // (RotateAnimation)AnimationUtils.loadAnimation(this,R.anim.rotate_textview);
    zoomText.setText("100%");
    // zoomText.setAnimation(rotate);
    takePhoto = (ImageButton) findViewById(R.id.takePhotoButton);
    switchMode = (ImageButton) findViewById(R.id.switchCameraMode);
    zoomIn = (ImageButton) findViewById(R.id.zoomInButton);
    zoomOut = (ImageButton) findViewById(R.id.zoomOutButton);

    mSerialService = new BluetoothSerialService(this, mHandlerBT /*, mEmulatorView*/);

    bluetoothNameLabel = (TextView) findViewById(R.id.bluetoothtext);

    mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
    // BluetoothAdapter myBluetoothAdapter = null; //This was to test to see what the
    // noBluetoothAdapter() method did
    if (mBluetoothAdapter == null) {
      mMenuItemConnect.setEnabled(false);
    }
  }
 public double getDiagonal() {
   return ScreenDimension.getScreenDiagonal(this);
 }