當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。