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


Java IntentIntegrator.forSupportFragment方法代码示例

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


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

示例1: callScanner

import com.google.zxing.integration.android.IntentIntegrator; //导入方法依赖的package包/类
/**
 * Inicia el lector de barras.
 * Devuelve el resultado por {@link #onActivityResult(int, int, Intent)}.
 */
private void callScanner() {
    IntentIntegrator integrator = IntentIntegrator.forSupportFragment(this);
    integrator.setDesiredBarcodeFormats(IntentIntegrator.ONE_D_CODE_TYPES);
    integrator.setPrompt(getString(R.string.balance_align_barcode));
    integrator.setBeepEnabled(false);
    integrator.setBarcodeImageEnabled(true);
    integrator.initiateScan();
}
 
开发者ID:AIDEA775,项目名称:UNCmorfi,代码行数:13,代码来源:BalanceFragment.java

示例2: 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

示例3: decodeUseCamera

import com.google.zxing.integration.android.IntentIntegrator; //导入方法依赖的package包/类
private void decodeUseCamera() {
    IntentIntegrator integrator = IntentIntegrator.forSupportFragment(this);
    integrator.setBeepEnabled(true);
    integrator.setBarcodeImageEnabled(true);
    integrator.setOrientationLocked(true);
    integrator.initiateScan();
}
 
开发者ID:tranleduy2000,项目名称:text_converter,代码行数:8,代码来源:BarCodeCodecFragment.java

示例4: 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


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