src/android/src/gmvScanner/BarcodeCaptureActivity.java
/**
     * Initializes the UI and creates the detector pipeline.
     */
Initializes the UI and creates the detector pipeline.
Initializes the UI and creates the detector pipeline .
@Override
    public void onCreate(Bundle icicle) {
        super.onCreate(icicle);
        View decorView = getWindow().getDecorView();
        int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN;
        decorView.setSystemUiVisibility(uiOptions);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                WindowManager.LayoutParams.FLAG_FULLSCREEN);
        if(getActionBar() != null) {
            getActionBar().hide();
        }
        if(getSupportActionBar() != null) {
            getSupportActionBar().hide();
        }
        setContentView(getResources().getIdentifier("barcode_capture", "layout", getPackageName()));
        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
        mPreview = (CameraSourcePreview) findViewById(getResources().getIdentifier("preview", "id", getPackageName()));
        mPreview.ViewFinderWidth = ViewFinderWidth;
        mPreview.ViewFinderHeight = ViewFinderHeight;
        mGraphicOverlay = (GraphicOverlay<BarcodeGraphic>) findViewById(getResources().getIdentifier("graphicOverlay", "id", getPackageName()));
        DetectionTypes = getIntent().getIntExtra("DetectionTypes", 1234);
        ViewFinderWidth = getIntent().getDoubleExtra("ViewFinderWidth", .5);
        ViewFinderHeight = getIntent().getDoubleExtra("ViewFinderHeight", .7);
        int rc = ActivityCompat.checkSelfPermission(this, Manifest.permission.CAMERA);
        if (rc == PackageManager.PERMISSION_GRANTED) {
            createCameraSource(true, false);
        } else {
            requestCameraPermission();
        }
        gestureDetector = new GestureDetector(this, new CaptureGestureListener());
        scaleGestureDetector = new ScaleGestureDetector(this, new ScaleListener());
    }
@ Override public void onCreate ( Bundle icicle ) { super . onCreate ( icicle ) ; View decorView = getWindow ( ) . getDecorView ( ) ; int uiOptions = View . SYSTEM_UI_FLAG_FULLSCREEN ; decorView . setSystemUiVisibility ( uiOptions ) ; getWindow ( ) . setFlags ( WindowManager . LayoutParams . FLAG_FULLSCREEN , WindowManager . LayoutParams . FLAG_FULLSCREEN ) ; if ( getActionBar ( ) != null ) { getActionBar ( ) . hide ( ) ; } if ( getSupportActionBar ( ) != null ) { getSupportActionBar ( ) . hide ( ) ; } setContentView ( getResources ( ) . getIdentifier ( "barcode_capture" , "layout" , getPackageName ( ) ) ) ; setRequestedOrientation ( ActivityInfo . SCREEN_ORIENTATION_PORTRAIT ) ; mPreview = ( CameraSourcePreview ) findViewById ( getResources ( ) . getIdentifier ( "preview" , "id" , getPackageName ( ) ) ) ; mPreview . ViewFinderWidth = ViewFinderWidth ; mPreview . ViewFinderHeight = ViewFinderHeight ; mGraphicOverlay = ( GraphicOverlay < BarcodeGraphic > ) findViewById ( getResources ( ) . getIdentifier ( "graphicOverlay" , "id" , getPackageName ( ) ) ) ; DetectionTypes = getIntent ( ) . getIntExtra ( "DetectionTypes" , 1234 ) ; ViewFinderWidth = getIntent ( ) . getDoubleExtra ( "ViewFinderWidth" , .5 ) ; ViewFinderHeight = getIntent ( ) . getDoubleExtra ( "ViewFinderHeight" , .7 ) ; int rc = ActivityCompat . checkSelfPermission ( this , Manifest . permission . CAMERA ) ; if ( rc == PackageManager . PERMISSION_GRANTED ) { createCameraSource ( true , false ) ; } else { requestCameraPermission ( ) ; } gestureDetector = new GestureDetector ( this , new CaptureGestureListener ( ) ) ; scaleGestureDetector = new ScaleGestureDetector ( this , new ScaleListener ( ) ) ; }
Initializes the UI and creates the detector pipeline.
Initializes the UI and creates the detector pipeline .
// Hide the status bar and action bar. // Remember that you should never show the action bar if the // status bar is hidden, so hide that too if necessary. // read parameters from the intent used to launch the activity. // Check for the camera permission before accessing the camera.  If the // permission is not granted yet, request permission.