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


Java IntentIntegrator.setPrompt方法代码示例

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


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

示例1: onOptionsItemSelected

import com.google.zxing.integration.android.IntentIntegrator; //导入方法依赖的package包/类
@Override
public boolean onOptionsItemSelected(MenuItem item) {
  switch (item.getItemId()) {
    case R.id.action_refresh:
      createWeexInstance();
      renderPage();
      break;
    case R.id.action_scan:
      IntentIntegrator integrator = new IntentIntegrator(this);
      integrator.setDesiredBarcodeFormats(IntentIntegrator.QR_CODE_TYPES);
      integrator.setPrompt("Scan a barcode");
      //integrator.setCameraId(0);  // Use a specific camera of the device
      integrator.setBeepEnabled(true);
      integrator.setOrientationLocked(false);
      integrator.setBarcodeImageEnabled(true);
      integrator.setPrompt(getString(R.string.capture_qrcode_prompt));
      integrator.initiateScan();
      break;
    case android.R.id.home:
      finish();
    default:
      break;
  }

  return super.onOptionsItemSelected(item);
}
 
开发者ID:wangwei123,项目名称:my-weex,代码行数:27,代码来源:WXPageActivity.java

示例2: onClick

import com.google.zxing.integration.android.IntentIntegrator; //导入方法依赖的package包/类
@Override
public void onClick(View v) {
    if (textBack.equals(v)) {
        finish();
    } else if (textScan.equals(v)) {
        IntentIntegrator integrator = new IntentIntegrator(this);
        integrator.setDesiredBarcodeFormats(IntentIntegrator.QR_CODE_TYPES);
        integrator.setPrompt("Scan a barcode");
        //integrator.setCameraId(0);  // Use a specific camera of the device
        integrator.setBeepEnabled(true);
        integrator.setOrientationLocked(false);
        integrator.setBarcodeImageEnabled(true);
        integrator.setPrompt("请将条码置于取景框内扫描");
        integrator.initiateScan();
    } else if (btnSave.equals(v)) {
        save();
    } else if (btnReset.equals(v)) {
        save();
        AppExitUtil.restart(this);
    } else if (btnOpen.equals(v)) {
        String page = editOpen.getText().toString().trim();
        UWXJumpUtil.openPage(this, page);
    }
}
 
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:25,代码来源:WXDebugActivity.java

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

示例4: onOptionsItemSelected

import com.google.zxing.integration.android.IntentIntegrator; //导入方法依赖的package包/类
@Override
public boolean onOptionsItemSelected(MenuItem item) {
    switch (item.getItemId()) {
        case R.id.action_refresh:
            createWeexInstance();
            renderPage();
            break;
        case R.id.action_scan:
            IntentIntegrator integrator = new IntentIntegrator(this);
            integrator.setDesiredBarcodeFormats(IntentIntegrator.QR_CODE_TYPES);
            integrator.setPrompt("Scan a barcode");
            //integrator.setCameraId(0);  // Use a specific camera of the device
            integrator.setBeepEnabled(true);
            integrator.setOrientationLocked(false);
            integrator.setBarcodeImageEnabled(true);
            integrator.initiateScan();
            //scanQrCode();
            break;
        default:
            break;
    }

    return super.onOptionsItemSelected(item);
}
 
开发者ID:dodola,项目名称:WeexOne,代码行数:25,代码来源:IndexActivity.java

示例5: zxingScan

import com.google.zxing.integration.android.IntentIntegrator; //导入方法依赖的package包/类
/**
 * This method handles the communication to the ZXING API -> Apache License 2.0
 * For more information please check out the link below.
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 */
public void zxingScan(){
    IntentIntegrator integrator = new IntentIntegrator(activity);
    integrator.setDesiredBarcodeFormats(IntentIntegrator.ALL_CODE_TYPES);
    integrator.setPrompt((String) getResources().getText(R.string.xzing_label));
    integrator.setCameraId(0);
    integrator.setBeepEnabled(false);
    integrator.setBarcodeImageEnabled(false);
    integrator.initiateScan();
}
 
开发者ID:Fr4gorSoftware,项目名称:SecScanQR,代码行数:16,代码来源:MainActivity.java

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

示例7: openQRScanner

import com.google.zxing.integration.android.IntentIntegrator; //导入方法依赖的package包/类
void openQRScanner() {
    IntentIntegrator integrator = new IntentIntegrator(getActivity());
    integrator.initiateScan();
    integrator.setDesiredBarcodeFormats(IntentIntegrator.QR_CODE_TYPES);
    integrator.setPrompt("Scan a qr code");
    integrator.initiateScan();
}
 
开发者ID:humaniq,项目名称:humaniq-android,代码行数:8,代码来源:TransferCoinsFragment.java

示例8: openScanner

import com.google.zxing.integration.android.IntentIntegrator; //导入方法依赖的package包/类
private void openScanner(){
    IntentIntegrator integrator = new IntentIntegrator(getActivity());
    integrator.setDesiredBarcodeFormats(IntentIntegrator.QR_CODE_TYPES);
    integrator.setPrompt(getString(R.string.qr_scanner_message));
    integrator.setBeepEnabled(false);
    integrator.initiateScan();
}
 
开发者ID:casific,项目名称:murmur,代码行数:8,代码来源:ContactsFragment.java

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

示例10: joinGame

import com.google.zxing.integration.android.IntentIntegrator; //导入方法依赖的package包/类
public void joinGame ()
{
    IntentIntegrator integrator = new IntentIntegrator(this);
    integrator.setDesiredBarcodeFormats(IntentIntegrator.QR_CODE_TYPES);
    integrator.setPrompt("Scan");
    integrator.setCameraId(0);
    integrator.setBeepEnabled(false);
    integrator.initiateScan();
}
 
开发者ID:rhintersteininger,项目名称:open-wheels,代码行数:10,代码来源:LobbyActivity.java

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

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

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

示例14: doScan

import com.google.zxing.integration.android.IntentIntegrator; //导入方法依赖的package包/类
public void doScan() {
    IntentIntegrator integrator = new IntentIntegrator(this);
    integrator.setDesiredBarcodeFormats(IntentIntegrator.ALL_CODE_TYPES);
    integrator.setOrientationLocked(true);
    integrator.setTimeout(30 * 1000);
    integrator.setBeepEnabled(false);
    integrator.setPrompt(getString(R.string.scan_barcode));
    integrator.initiateScan();
}
 
开发者ID:citiususc,项目名称:calendula,代码行数:10,代码来源:MedicinesSearchActivity.java

示例15: doScan

import com.google.zxing.integration.android.IntentIntegrator; //导入方法依赖的package包/类
public void doScan() {
    IntentIntegrator integrator = new IntentIntegrator(this);
    integrator.setDesiredBarcodeFormats(IntentIntegrator.QR_CODE_TYPES);
    integrator.setPrompt(getString(R.string.scan_qr));
    //integrator.setResultDisplayDuration(500);
    integrator.initiateScan();
}
 
开发者ID:citiususc,项目名称:calendula,代码行数:8,代码来源:ScanActivity.java


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