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