当前位置: 首页>>代码示例>>Java>>正文


Java IntentIntegrator.setCaptureActivity方法代码示例

本文整理汇总了Java中com.google.zxing.integration.android.IntentIntegrator.setCaptureActivity方法的典型用法代码示例。如果您正苦于以下问题:Java IntentIntegrator.setCaptureActivity方法的具体用法?Java IntentIntegrator.setCaptureActivity怎么用?Java IntentIntegrator.setCaptureActivity使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.zxing.integration.android.IntentIntegrator的用法示例。


在下文中一共展示了IntentIntegrator.setCaptureActivity方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: scan

import com.google.zxing.integration.android.IntentIntegrator; //导入方法依赖的package包/类
/**
 * 打开二维码
 * <p>
 * 参数:
 * videoUrl:视频地址
 */
public static void scan(IQuickFragment webLoader, WebView wv, JSONObject param, Callback callback) {
    Object fragment = webLoader.getPageControl().getFragment();
    IntentIntegrator integrator = null;
    if (fragment instanceof Fragment) {
        integrator = IntentIntegrator.forFragment((Fragment) fragment);
    } else if (fragment instanceof android.support.v4.app.Fragment) {
        integrator = IntentIntegrator.forSupportFragment((android.support.v4.app.Fragment) fragment);
    }
    if (integrator != null) {
        integrator.setCaptureActivity(ScanCaptureActivity.class);
        integrator.initiateScan();
        webLoader.getWebloaderControl().addPort(AutoCallbackDefined.OnScanCode, callback.getPort());
    }
}
 
开发者ID:quickhybrid,项目名称:quickhybrid-android,代码行数:21,代码来源:UtilApi.java

示例2: scan

import com.google.zxing.integration.android.IntentIntegrator; //导入方法依赖的package包/类
public void scan() {

        integrator = new IntentIntegrator(this);
        integrator.setDesiredBarcodeFormats(IntentIntegrator.QR_CODE_TYPES);
        integrator.setCameraId(EssensbonUtils.getPreferredCamera());
        integrator.setOrientationLocked(true);
        integrator.setBeepEnabled(false);
        integrator.setCaptureActivity(ScanActivity.class);
        integrator.setPrompt("");
        integrator.initiateScan();

    }
 
开发者ID:LCA311,项目名称:leoapp-sources,代码行数:13,代码来源:EssensbonActivity.java

示例3: scan

import com.google.zxing.integration.android.IntentIntegrator; //导入方法依赖的package包/类
@OnClick(R.id.btn_qr_scan)
void scan() {
    IntentIntegrator integrator = new IntentIntegrator(AddSiteActivity.this);
    integrator.setCaptureActivity(MyCaptureActivity.class);
    integrator.setOrientationLocked(true);
    integrator.setPrompt("请扫描二维码");
    integrator.addExtra("SCAN_WIDTH", 480);
    integrator.addExtra("SCAN_HEIGHT", 480);
    integrator.initiateScan(IntentIntegrator.QR_CODE_TYPES);
}
 
开发者ID:PureDark,项目名称:H-Viewer,代码行数:11,代码来源:AddSiteActivity.java

示例4: MainController

import com.google.zxing.integration.android.IntentIntegrator; //导入方法依赖的package包/类
public MainController(Activity activity){
    IntentIntegrator integrator = new IntentIntegrator(activity);
    integrator.setOrientationLocked(true);
    integrator.setBeepEnabled(false);
    integrator.setCaptureActivity(ReadQRCodeScreen.class);
    integrator.initiateScan();
}
 
开发者ID:fga-gpp-mds,项目名称:2016.2-MissaoNascente,代码行数:8,代码来源:MainController.java

示例5: startScanActivity

import com.google.zxing.integration.android.IntentIntegrator; //导入方法依赖的package包/类
private void startScanActivity() {
    IntentIntegrator integrator = new IntentIntegrator(this);
    integrator.setCaptureActivity(CustomCaptureActivity.class);
    integrator.setOrientationLocked(false);

    integrator.initiateScan();
}
 
开发者ID:andreacioni,项目名称:KeeLink,代码行数:8,代码来源:MainActivity.java

示例6: takeQrCodePicture

import com.google.zxing.integration.android.IntentIntegrator; //导入方法依赖的package包/类
public void takeQrCodePicture() {
    IntentIntegrator integrator = new IntentIntegrator(this);
    integrator.setCaptureActivity(MyCaptureActivity.class);
    integrator.setDesiredBarcodeFormats(IntentIntegrator.QR_CODE_TYPES);
    integrator.setOrientationLocked(false);
    integrator.addExtra(Intents.Scan.BARCODE_IMAGE_ENABLED, true);
    integrator.initiateScan();
}
 
开发者ID:mirioeggmann,项目名称:appquest-pedometer,代码行数:9,代码来源:WalkActivity.java

示例7: scanFromFragment

import com.google.zxing.integration.android.IntentIntegrator; //导入方法依赖的package包/类
public void scanFromFragment() {

        IntentIntegrator integrator = IntentIntegrator.forFragment(this);
        integrator.setCaptureActivity(MyCaptureActivity.class);
        SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getActivity().getApplicationContext());
        integrator.setBeepEnabled(prefs.getBoolean("beep", true));
        integrator.setOrientationLocked(false);
        integrator.setPrompt(getResources().getString(R.string.scan_text));
        integrator.initiateScan();
    }
 
开发者ID:SecUSo,项目名称:privacy-friendly-qr-scanner,代码行数:11,代码来源:ScanFragment.java

示例8: onOptionsItemSelected

import com.google.zxing.integration.android.IntentIntegrator; //导入方法依赖的package包/类
@Override
public boolean onOptionsItemSelected(MenuItem item) {
    switch (item.getItemId()) {
        case R.id.webModeration:
            IntentIntegrator integrator = new IntentIntegrator(this);
            integrator.setCaptureActivity(CaptureActivityAnyOrientation.class);
            integrator.setOrientationLocked(false);
            integrator.initiateScan();
    }
    return super.onOptionsItemSelected(item);
}
 
开发者ID:rapidpro,项目名称:ureport-android,代码行数:12,代码来源:ModerationActivity.java

示例9: ScanModule

import com.google.zxing.integration.android.IntentIntegrator; //导入方法依赖的package包/类
public ScanModule(MainActivity currentActivity) {
	super();
	mIntentIntegrator = new IntentIntegrator(currentActivity);
	mIntentIntegrator.setOrientationLocked(true);
	mIntentIntegrator.setCaptureActivity(YeeuuCaptureActivity.class);
	currentActivity.getActivityResultManager().put(IntentIntegrator.REQUEST_CODE, this);
}
 
开发者ID:mickeyinfoshan,项目名称:Android-Native-Modules,代码行数:8,代码来源:ScanModule.java

示例10: configureIntentIntegrator

import com.google.zxing.integration.android.IntentIntegrator; //导入方法依赖的package包/类
/**
 * Configures the QR Code scanner with invariable parameters
 *
 * @param intentIntegrator the IntentIntegrator to configure
 * @param promptString     the text to display in the prompt of the QR Code scanner overlay
 */
private static void configureIntentIntegrator(IntentIntegrator intentIntegrator,
                                              String promptString) {
    if (null == intentIntegrator) {
        return;
    }
    intentIntegrator.setPrompt(promptString);
    intentIntegrator.setDesiredBarcodeFormats(IntentIntegrator.QR_CODE_TYPES);
    intentIntegrator.setCaptureActivity(QRCodeScannerActivity.class);
    intentIntegrator.setBarcodeImageEnabled(true);
    intentIntegrator.setOrientationLocked(false);
    intentIntegrator.initiateScan();
}
 
开发者ID:savoirfairelinux,项目名称:ring-client-android,代码行数:19,代码来源:QRCodeScannerActivity.java

示例11: startBarcodeScan

import com.google.zxing.integration.android.IntentIntegrator; //导入方法依赖的package包/类
/**
 * Start scanning activity with any screen orientation
 */
private void startBarcodeScan() {
    IntentIntegrator integrator = IntentIntegrator.forSupportFragment(this);
    integrator.setCaptureActivity(CaptureAnyOrientationActivity.class);
    integrator.setOrientationLocked(false);
    integrator.initiateScan();
}
 
开发者ID:frank-tan,项目名称:Super-Duo,代码行数:10,代码来源:AddBookFragment.java

示例12: scanFieldPaper

import com.google.zxing.integration.android.IntentIntegrator; //导入方法依赖的package包/类
public void scanFieldPaper(View view) {
    IntentIntegrator integrator = new IntentIntegrator(this);
    integrator.setCaptureActivity(ZXingActivity.class);
    integrator.setOrientationLocked(false);
    integrator.setPrompt("Place a field paper QR code inside the viewfinder to scan.");
    integrator.setBeepEnabled(true);
    integrator.initiateScan();
}
 
开发者ID:posm,项目名称:OpenMapKitAndroid,代码行数:9,代码来源:DeploymentsActivity.java


注:本文中的com.google.zxing.integration.android.IntentIntegrator.setCaptureActivity方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。