Search in sources :

Example 11 with IntentIntegrator

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

the class MainActivity method scanBarcodeCustomLayout.

public void scanBarcodeCustomLayout(View view) {
    IntentIntegrator integrator = new IntentIntegrator(this);
    integrator.setCaptureActivity(AnyOrientationCaptureActivity.class);
    integrator.setDesiredBarcodeFormats(IntentIntegrator.ONE_D_CODE_TYPES);
    integrator.setPrompt("Scan something");
    integrator.setOrientationLocked(false);
    integrator.setBeepEnabled(false);
    integrator.initiateScan();
}
Also used : IntentIntegrator(com.google.zxing.integration.android.IntentIntegrator)

Example 12 with IntentIntegrator

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

the class ZXingTestActivity method encodeBarcode.

private void encodeBarcode(CharSequence type, CharSequence data) {
    IntentIntegrator integrator = new IntentIntegrator(this);
    integrator.shareText(data, type);
}
Also used : IntentIntegrator(com.google.zxing.integration.android.IntentIntegrator)

Example 13 with IntentIntegrator

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

the class ZXingTestActivity method encodeBarcode.

private void encodeBarcode(CharSequence type, Bundle data) {
    IntentIntegrator integrator = new IntentIntegrator(this);
    integrator.addExtra("ENCODE_DATA", data);
    // data.toString() isn't used
    integrator.shareText(data.toString(), type);
}
Also used : IntentIntegrator(com.google.zxing.integration.android.IntentIntegrator)

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