Search in sources :

Example 1 with IntentIntegrator

use of com.google.zxing.integration.android.IntentIntegrator in project zxing-android-embedded by journeyapps.

the class MainActivity method scanBarcodeInverted.

public void scanBarcodeInverted(View view) {
    IntentIntegrator integrator = new IntentIntegrator(this);
    integrator.addExtra(Intents.Scan.INVERTED_SCAN, true);
    integrator.initiateScan();
}
Also used : IntentIntegrator(com.google.zxing.integration.android.IntentIntegrator)

Example 2 with IntentIntegrator

use of com.google.zxing.integration.android.IntentIntegrator in project zxing-android-embedded by journeyapps.

the class MainActivity method scanMarginScanner.

public void scanMarginScanner(View view) {
    IntentIntegrator integrator = new IntentIntegrator(this);
    integrator.setOrientationLocked(false);
    integrator.setCaptureActivity(SmallCaptureActivity.class);
    integrator.initiateScan();
}
Also used : IntentIntegrator(com.google.zxing.integration.android.IntentIntegrator)

Example 3 with IntentIntegrator

use of com.google.zxing.integration.android.IntentIntegrator in project zxing-android-embedded by journeyapps.

the class MainActivity method scanBarcodeCustomOptions.

public void scanBarcodeCustomOptions(View view) {
    IntentIntegrator integrator = new IntentIntegrator(this);
    integrator.setDesiredBarcodeFormats(IntentIntegrator.ONE_D_CODE_TYPES);
    integrator.initiateScan();
}
Also used : IntentIntegrator(com.google.zxing.integration.android.IntentIntegrator)

Example 4 with IntentIntegrator

use of com.google.zxing.integration.android.IntentIntegrator in project xabber-android by redsolution.

the class FingerprintViewer method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    if (isFinishing()) {
        return;
    }
    setContentView(R.layout.fingerprint_viewer);
    integrator = new IntentIntegrator(this);
    Intent intent = getIntent();
    account = getAccount(intent);
    user = getUser(intent);
    if (AccountManager.getInstance().getAccount(account) == null || user == null) {
        Application.getInstance().onError(R.string.ENTRY_IS_NOT_FOUND);
        finish();
        return;
    }
    if (savedInstanceState != null) {
        remoteFingerprint = savedInstanceState.getString(SAVED_REMOTE_FINGERPRINT);
        localFingerprint = savedInstanceState.getString(SAVED_LOCAL_FINGERPRINT);
    } else {
        remoteFingerprint = OTRManager.getInstance().getRemoteFingerprint(account, user);
        localFingerprint = OTRManager.getInstance().getLocalFingerprint(account);
    }
    verifiedView = (CheckBox) findViewById(R.id.verified);
    verifiedView.setOnCheckedChangeListener(this);
    scanView = findViewById(R.id.scan);
    scanView.setOnClickListener(this);
    showView = findViewById(R.id.show);
    showView.setOnClickListener(this);
    copyView = findViewById(R.id.copy);
    copyView.setOnClickListener(this);
    isUpdating = false;
    contactTitleActionBarInflater = new ContactTitleActionBarInflater(this, (Toolbar) findViewById(R.id.toolbar_default));
    contactTitleActionBarInflater.setUpActionBarView();
}
Also used : ContactTitleActionBarInflater(com.xabber.android.ui.helper.ContactTitleActionBarInflater) IntentIntegrator(com.google.zxing.integration.android.IntentIntegrator) Intent(android.content.Intent) Toolbar(android.support.v7.widget.Toolbar)

Example 5 with IntentIntegrator

use of com.google.zxing.integration.android.IntentIntegrator in project Conversations by siacs.

the class VerifyOTRActivity method handleIntent.

protected boolean handleIntent(Intent intent) {
    if (intent != null && intent.getAction().equals(ACTION_VERIFY_CONTACT)) {
        this.mAccount = extractAccount(intent);
        if (this.mAccount == null) {
            return false;
        }
        try {
            this.mConversation = this.xmppConnectionService.find(this.mAccount, Jid.fromString(intent.getExtras().getString("contact")));
            if (this.mConversation == null) {
                return false;
            }
        } catch (final InvalidJidException ignored) {
            return false;
        }
        this.mode = intent.getIntExtra("mode", MODE_MANUAL_VERIFICATION);
        if (this.mode == MODE_SCAN_FINGERPRINT) {
            new IntentIntegrator(this).initiateScan();
            return false;
        }
        return true;
    } else {
        return false;
    }
}
Also used : IntentIntegrator(com.google.zxing.integration.android.IntentIntegrator) InvalidJidException(eu.siacs.conversations.xmpp.jid.InvalidJidException)

Aggregations

IntentIntegrator (com.google.zxing.integration.android.IntentIntegrator)13 DialogInterface (android.content.DialogInterface)1 Intent (android.content.Intent)1 Toolbar (android.support.v7.widget.Toolbar)1 DevOptionHandler (com.alibaba.weex.commons.util.DevOptionHandler)1 ContactTitleActionBarInflater (com.xabber.android.ui.helper.ContactTitleActionBarInflater)1 InvalidJidException (eu.siacs.conversations.xmpp.jid.InvalidJidException)1 LinkedHashMap (java.util.LinkedHashMap)1