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();
}
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();
}
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();
}
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();
}
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;
}
}
Aggregations