Search in sources :

Example 1 with ZXingScannerView

use of me.dm7.barcodescanner.zxing.ZXingScannerView in project OnlineCanteen by josephgunawan97.

the class QrActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    mScannerView = new ZXingScannerView(this);
    setContentView(mScannerView);
    if (ContextCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.CAMERA) == PackageManager.PERMISSION_DENIED)
        ActivityCompat.requestPermissions(this, new String[] { Manifest.permission.CAMERA }, MY_CAMERA_REQUEST_CODE);
    Intent intent = getIntent();
    value = intent.getStringExtra("Location");
    if (value.equals("order")) {
        pos = intent.getIntExtra("Position", 0);
        transactionHistory = (ArrayList<Transaction>) intent.getSerializableExtra("Transaction");
    }
}
Also used : Transaction(com.example.asus.onlinecanteen.model.Transaction) Intent(android.content.Intent) ZXingScannerView(me.dm7.barcodescanner.zxing.ZXingScannerView)

Example 2 with ZXingScannerView

use of me.dm7.barcodescanner.zxing.ZXingScannerView in project ButterRemote-Android by se-bastiaan.

the class PairingScannerActivity method onCreate.

@Override
public void onCreate(Bundle state) {
    super.onCreate(state);
    scannerView = new ZXingScannerView(this);
    setContentView(scannerView);
}
Also used : ZXingScannerView(me.dm7.barcodescanner.zxing.ZXingScannerView)

Example 3 with ZXingScannerView

use of me.dm7.barcodescanner.zxing.ZXingScannerView in project barcodescanner by dm77.

the class FullScannerActivity method onCreate.

@Override
public void onCreate(Bundle state) {
    super.onCreate(state);
    if (state != null) {
        mFlash = state.getBoolean(FLASH_STATE, false);
        mAutoFocus = state.getBoolean(AUTO_FOCUS_STATE, true);
        mSelectedIndices = state.getIntegerArrayList(SELECTED_FORMATS);
        mCameraId = state.getInt(CAMERA_ID, -1);
    } else {
        mFlash = false;
        mAutoFocus = true;
        mSelectedIndices = null;
        mCameraId = -1;
    }
    setContentView(R.layout.activity_simple_scanner);
    setupToolbar();
    ViewGroup contentFrame = (ViewGroup) findViewById(R.id.content_frame);
    mScannerView = new ZXingScannerView(this);
    setupFormats();
    contentFrame.addView(mScannerView);
}
Also used : ViewGroup(android.view.ViewGroup) ZXingScannerView(me.dm7.barcodescanner.zxing.ZXingScannerView)

Example 4 with ZXingScannerView

use of me.dm7.barcodescanner.zxing.ZXingScannerView in project barcodescanner by dm77.

the class ScalingScannerActivity method onCreate.

@Override
public void onCreate(Bundle state) {
    super.onCreate(state);
    setContentView(R.layout.activity_scaling_scanner);
    setupToolbar();
    ViewGroup contentFrame = (ViewGroup) findViewById(R.id.content_frame);
    mScannerView = new ZXingScannerView(this);
    contentFrame.addView(mScannerView);
}
Also used : ViewGroup(android.view.ViewGroup) ZXingScannerView(me.dm7.barcodescanner.zxing.ZXingScannerView)

Example 5 with ZXingScannerView

use of me.dm7.barcodescanner.zxing.ZXingScannerView in project barcodescanner by dm77.

the class FullScannerFragment method onCreateView.

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle state) {
    mScannerView = new ZXingScannerView(getActivity());
    if (state != null) {
        mFlash = state.getBoolean(FLASH_STATE, false);
        mAutoFocus = state.getBoolean(AUTO_FOCUS_STATE, true);
        mSelectedIndices = state.getIntegerArrayList(SELECTED_FORMATS);
        mCameraId = state.getInt(CAMERA_ID, -1);
    } else {
        mFlash = false;
        mAutoFocus = true;
        mSelectedIndices = null;
        mCameraId = -1;
    }
    setupFormats();
    return mScannerView;
}
Also used : ZXingScannerView(me.dm7.barcodescanner.zxing.ZXingScannerView)

Aggregations

ZXingScannerView (me.dm7.barcodescanner.zxing.ZXingScannerView)8 ViewGroup (android.view.ViewGroup)4 Context (android.content.Context)1 Intent (android.content.Intent)1 Transaction (com.example.asus.onlinecanteen.model.Transaction)1 BarcodeFormat (com.google.zxing.BarcodeFormat)1 IViewFinder (me.dm7.barcodescanner.core.IViewFinder)1