當前位置: 首頁>>代碼示例>>Java>>正文


Java ParsedResult.getType方法代碼示例

本文整理匯總了Java中com.google.zxing.client.result.ParsedResult.getType方法的典型用法代碼示例。如果您正苦於以下問題:Java ParsedResult.getType方法的具體用法?Java ParsedResult.getType怎麽用?Java ParsedResult.getType使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.google.zxing.client.result.ParsedResult的用法示例。


在下文中一共展示了ParsedResult.getType方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: makeResultHandler

import com.google.zxing.client.result.ParsedResult; //導入方法依賴的package包/類
public static ResultHandler makeResultHandler(CaptureActivity activity, Result rawResult) {
  ParsedResult result = parseResult(rawResult);
  switch (result.getType()) {
    case ADDRESSBOOK:
      return new AddressBookResultHandler(activity, result);
    case EMAIL_ADDRESS:
      return new EmailAddressResultHandler(activity, result);
    case PRODUCT:
      return new ProductResultHandler(activity, result, rawResult);
    case URI:
      return new URIResultHandler(activity, result);
    case WIFI:
      return new WifiResultHandler(activity, result);
    case GEO:
      return new GeoResultHandler(activity, result);
    case TEL:
      return new TelResultHandler(activity, result);
    case SMS:
      return new SMSResultHandler(activity, result);
    case CALENDAR:
      return new CalendarResultHandler(activity, result);
    case ISBN:
      return new ISBNResultHandler(activity, result, rawResult);
    default:
      return new TextResultHandler(activity, result, rawResult);
  }
}
 
開發者ID:amap-demo,項目名稱:weex-3d-map,代碼行數:28,代碼來源:ResultHandlerFactory.java

示例2: makeResultHandler

import com.google.zxing.client.result.ParsedResult; //導入方法依賴的package包/類
public static ResultHandler makeResultHandler(SweepActivity activity, Result rawResult) {
    ParsedResult result = parseResult(rawResult);
    if (result.getType() == ParsedResultType.URI) {
        return new URIResultHandler(activity, result);
    }
    return new TextResultHandler(activity, result, rawResult);
}
 
開發者ID:JackChan1999,項目名稱:letv,代碼行數:8,代碼來源:ResultHandlerFactory.java

示例3: makeResultHandler

import com.google.zxing.client.result.ParsedResult; //導入方法依賴的package包/類
public static ResultHandler makeResultHandler(QrCodeScannerActivity activity, Result rawResult) {
    ParsedResult result = parseResult(rawResult);
    switch (result.getType()) {
        case ADDRESSBOOK:
            return new AddressBookResultHandler(activity, result);
        case EMAIL_ADDRESS:
            return new EmailAddressResultHandler(activity, result);
        case PRODUCT:
            return new ProductResultHandler(activity, result, rawResult);
        case URI:
            return new URIResultHandler(activity, result);
        case WIFI:
            return new WifiResultHandler(activity, result);
        case GEO:
            return new GeoResultHandler(activity, result);
        case TEL:
            return new TelResultHandler(activity, result);
        case SMS:
            return new SMSResultHandler(activity, result);
        case CALENDAR:
            return new CalendarResultHandler(activity, result);
        case ISBN:
            return new ISBNResultHandler(activity, result, rawResult);
        default:
            return new TextResultHandler(activity, result, rawResult);
    }
}
 
開發者ID:xiong-it,項目名稱:ZXingAndroidExt,代碼行數:28,代碼來源:ResultHandlerFactory.java

示例4: makeResultHandler

import com.google.zxing.client.result.ParsedResult; //導入方法依賴的package包/類
public static ResultHandler makeResultHandler(CaptureActivity activity, Result rawResult) {
  ParsedResult result = parseResult(rawResult);
  switch (result.getType()) {
    case ADDRESSBOOK:
      return new AddressBookResultHandler(activity, result);
    case EMAIL_ADDRESS:
      return new EmailAddressResultHandler(activity, result);
    case PRODUCT:
      return new ProductResultHandler(activity, result, rawResult);
    case URI:
      return new URIResultHandler(activity, result);
   /* case WIFI:
      return new WifiResultHandler(activity, result);*/
    case GEO:
      return new GeoResultHandler(activity, result);
    case TEL:
      return new TelResultHandler(activity, result);
    case SMS:
      return new SMSResultHandler(activity, result);
    case CALENDAR:
      return new CalendarResultHandler(activity, result);
    case ISBN:
      return new ISBNResultHandler(activity, result, rawResult);
    default:
      return new TextResultHandler(activity, result, rawResult);
  }
}
 
開發者ID:yun2win,項目名稱:tvConnect_android,代碼行數:28,代碼來源:ResultHandlerFactory.java


注:本文中的com.google.zxing.client.result.ParsedResult.getType方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。