Java 类com.google.zxing.client.result.ParsedResultType 实例源码

项目:AndroidWebServ    文件:WSActivity.java   
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    if (requestCode == REQ_CAPTURE) {
        if (resultCode == RESULT_OK) {
            String result = data.getStringExtra(Intents.Scan.RESULT);
            ParsedResultType type = ParsedResultType.values()[data.getIntExtra(
                    Intents.Scan.RESULT_TYPE, ParsedResultType.TEXT.ordinal())];
            boolean isShow = false;
            try {
                if (type == ParsedResultType.URI) {
                    toBrowserActivity(result);
                } else {
                    isShow = true;
                }
            } catch (ActivityNotFoundException e) {
                isShow = true;
            } finally {
                lastResult = result;
                if (isShow)
                    showDialog(DLG_SCAN_RESULT);
            }
        }
    } else {
        super.onActivityResult(requestCode, resultCode, data);
    }
}
项目:letv    文件:ResultHandlerFactory.java   
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);
}
项目:BibSearch    文件:ResultHandlerFactory.java   
public static ResultHandler makeResultHandler(Activity activity, Result rawResult) {
  ParsedResult result = parseResult(rawResult);
  ParsedResultType type = result.getType();
  if (type.equals(ParsedResultType.ADDRESSBOOK)) {
    return new AddressBookResultHandler(activity, result);
  } else if (type.equals(ParsedResultType.EMAIL_ADDRESS)) {
    return new EmailAddressResultHandler(activity, result);
  } else if (type.equals(ParsedResultType.PRODUCT)) {
    return new ProductResultHandler(activity, result, rawResult);
  } else if (type.equals(ParsedResultType.URI)) {
    return new URIResultHandler(activity, result);
  } else if (type.equals(ParsedResultType.WIFI)) {
    return new WifiResultHandler(activity, result);
  } else if (type.equals(ParsedResultType.TEXT)) {
    return new TextResultHandler(activity, result, rawResult);
  } else if (type.equals(ParsedResultType.GEO)) {
    return new GeoResultHandler(activity, result);
  } else if (type.equals(ParsedResultType.TEL)) {
    return new TelResultHandler(activity, result);
  } else if (type.equals(ParsedResultType.SMS)) {
    return new SMSResultHandler(activity, result);
  } else if (type.equals(ParsedResultType.CALENDAR)) {
    return new CalendarResultHandler(activity, result);
  } else if (type.equals(ParsedResultType.ISBN)) {
    return new ISBNResultHandler(activity, result, rawResult);
  } else {
    // The TextResultHandler is the fallthrough for unsupported formats.
    return new TextResultHandler(activity, result, rawResult);
  }
}
项目:camera-through-wallpaper    文件:QRRecognizer.java   
public ParsedResultType getType() {
    return mType;
}
项目:codetalk    文件:MessageViewerActivity.java   
private void updateCode(final String codeHash, final String codeContents, final BarcodeFormat barcodeFormat,
        final ParsedResultType barcodeType) {

    // delay so we let the UI queries load first
    new Handler().postDelayed(new Runnable() {
        @Override
        public void run() {
            CloudCallbackHandler<List<CloudEntity>> handler = new CloudCallbackHandler<List<CloudEntity>>() {
                @Override
                public void onComplete(List<CloudEntity> results) {
                    if (results.size() <= 0) {
                        // no record for this code exists - create a CloudEntity with the new code
                        CloudEntity newCode = new CloudEntity(QRCloudUtils.DATABASE_KIND_CODES);
                        newCode.put(QRCloudUtils.DATABASE_PROP_HASH, codeHash);
                        newCode.put(QRCloudUtils.DATABASE_PROP_CONTENTS, codeContents);
                        newCode.put(QRCloudUtils.DATABASE_PROP_FORMAT, barcodeFormat.name());
                        newCode.put(QRCloudUtils.DATABASE_PROP_TYPE, barcodeType.name());
                        newCode.put(QRCloudUtils.DATABASE_PROP_SCANS, 1); // this is the initial scan
                        newCode.put(QRCloudUtils.DATABASE_PROP_SOURCE, ContentProviderAuthority.DB_SOURCE);

                        // execute the insertion; nothing we can do on error, so ignore the result
                        getCloudBackend().insert(newCode, null);
                    } else {
                        CloudEntity existingEntity = results.get(0);
                        if (existingEntity != null) {
                            Object currentScanCount = existingEntity.get(QRCloudUtils.DATABASE_PROP_SCANS);
                            if (currentScanCount != null) {
                                // update to increase the scan count; nothing to do on error, so no result handler
                                existingEntity.put(QRCloudUtils.DATABASE_PROP_SCANS,
                                        Integer.valueOf(currentScanCount.toString()) + 1);
                                getCloudBackend().update(existingEntity, null);
                            }
                        }
                    }
                }

                @Override
                public void onError(IOException exception) {
                    // nothing else we can do
                }
            };

            // now search for an existing record of this code
            CloudQuery cloudQuery = new CloudQuery(QRCloudUtils.DATABASE_KIND_CODES);
            cloudQuery.setFilter(F.eq(QRCloudUtils.DATABASE_PROP_HASH, codeHash));
            cloudQuery.setLimit(1);
            cloudQuery.setScope(Scope.PAST);
            getCloudBackend().list(cloudQuery, handler);
        }
    }, NON_URGENT_QUERY_DELAY);
}
项目:BibSearch    文件:NDEFSmartPosterParsedResult.java   
NDEFSmartPosterParsedResult(int action, String uri, String title) {
  super(ParsedResultType.NDEF_SMART_POSTER);
  this.action = action;
  this.uri = uri;
  this.title = title;
}
项目:keepass2android    文件:ResultHandler.java   
/**
 * A convenience method to get the parsed type. Should not be overridden.
 *
 * @return The parsed type, e.g. URI or ISBN
 */
public final ParsedResultType getType() {
  return result.getType();
}
项目:weex-3d-map    文件:ResultHandler.java   
/**
 * A convenience method to get the parsed type. Should not be overridden.
 *
 * @return The parsed type, e.g. URI or ISBN
 */
public final ParsedResultType getType() {
  return result.getType();
}
项目:ZXingAndroidExt    文件:ResultHandler.java   
/**
 * A convenience method to get the parsed type. Should not be overridden.
 *
 * @return The parsed type, e.g. URI or ISBN
 */
public final ParsedResultType getType() {
    return result.getType();
}
项目:tvConnect_android    文件:ResultHandler.java   
/**
 * A convenience method to get the parsed type. Should not be overridden.
 *
 * @return The parsed type, e.g. URI or ISBN
 */
public final ParsedResultType getType() {
  return result.getType();
}
项目:tvConnect_android    文件:ResultHandler.java   
/**
 * A convenience method to get the parsed type. Should not be overridden.
 *
 * @return The parsed type, e.g. URI or ISBN
 */
public final ParsedResultType getType() {
  return result.getType();
}
项目:appinventor-extensions    文件:ResultHandler.java   
/**
 * A convenience method to get the parsed type. Should not be overridden.
 *
 * @return The parsed type, e.g. URI or ISBN
 */
public final ParsedResultType getType() {
  return result.getType();
}
项目:KeePass2Android    文件:ResultHandler.java   
/**
 * A convenience method to get the parsed type. Should not be overridden.
 *
 * @return The parsed type, e.g. URI or ISBN
 */
public final ParsedResultType getType() {
  return result.getType();
}
项目:PortraitZXing    文件:ResultHandler.java   
/**
 * A convenience method to get the parsed type. Should not be overridden.
 *
 * @return The parsed type, e.g. URI or ISBN
 */
public final ParsedResultType getType() {
    return result.getType();
}
项目:PortraitZXing    文件:ResultHandler.java   
/**
 * A convenience method to get the parsed type. Should not be overridden.
 *
 * @return The parsed type, e.g. URI or ISBN
 */
public final ParsedResultType getType() {
    return result.getType();
}
项目:PortraitZXing    文件:ResultHandler.java   
/**
 * A convenience method to get the parsed type. Should not be overridden.
 *
 * @return The parsed type, e.g. URI or ISBN
 */
public final ParsedResultType getType() {
    return result.getType();
}
项目:PortraitZXing    文件:ResultHandler.java   
/**
 * A convenience method to get the parsed type. Should not be overridden.
 *
 * @return The parsed type, e.g. URI or ISBN
 */
public final ParsedResultType getType() {
    return result.getType();
}
项目:QRCodeUtility    文件:ResultHandler.java   
/**
 * A convenience method to get the parsed type. Should not be overridden.
 *
 * @return The parsed type, e.g. URI or ISBN
 */
public final ParsedResultType getType() {
    return result.getType();
}
项目:weex-analyzer-android    文件:ResultHandler.java   
/**
 * A convenience method to get the parsed type. Should not be overridden.
 *
 * @return The parsed type, e.g. URI or ISBN
 */
public final ParsedResultType getType() {
  return result.getType();
}
项目:weex-3d-map    文件:ResultHandler.java   
/**
 * A convenience method to get the parsed type. Should not be overridden.
 *
 * @return The parsed type, e.g. URI or ISBN
 */
public final ParsedResultType getType() {
  return result.getType();
}
项目:Weex-TestDemo    文件:ResultHandler.java   
/**
 * A convenience method to get the parsed type. Should not be overridden.
 *
 * @return The parsed type, e.g. URI or ISBN
 */
public final ParsedResultType getType() {
  return result.getType();
}
项目:weex    文件:ResultHandler.java   
/**
 * A convenience method to get the parsed type. Should not be overridden.
 *
 * @return The parsed type, e.g. URI or ISBN
 */
public final ParsedResultType getType() {
  return result.getType();
}
项目:sres-app    文件:ResultHandler.java   
/**
 * A convenience method to get the parsed type. Should not be overridden.
 *
 * @return The parsed type, e.g. URI or ISBN
 */
public final ParsedResultType getType() {
  return result.getType();
}
项目:faims-android    文件:ResultHandler.java   
/**
 * A convenience method to get the parsed type. Should not be overridden.
 *
 * @return The parsed type, e.g. URI or ISBN
 */
public final ParsedResultType getType() {
  return result.getType();
}
项目:nutriflash    文件:ResultHandler.java   
/**
 * A convenience method to get the parsed type. Should not be overridden.
 *
 * @return The parsed type, e.g. URI or ISBN
 */
public final ParsedResultType getType() {
    return result.getType();
}
项目:Discounty    文件:ResultHandler.java   
/**
 * A convenience method to get the parsed type. Should not be overridden.
 *
 * @return The parsed type, e.g. URI or ISBN
 */
public final ParsedResultType getType() {
    return result.getType();
}
项目:reacteu-app    文件:ResultHandler.java   
/**
 * A convenience method to get the parsed type. Should not be overridden.
 *
 * @return The parsed type, e.g. URI or ISBN
 */
public final ParsedResultType getType() {
  return result.getType();
}
项目:CordovaDemo    文件:ResultHandler.java   
/**
 * A convenience method to get the parsed type. Should not be overridden.
 *
 * @return The parsed type, e.g. URI or ISBN
 */
public final ParsedResultType getType() {
  return result.getType();
}
项目:ng-cordova-demo    文件:ResultHandler.java   
/**
 * A convenience method to get the parsed type. Should not be overridden.
 *
 * @return The parsed type, e.g. URI or ISBN
 */
public final ParsedResultType getType() {
  return result.getType();
}
项目:zxing-bsplus    文件:ResultHandler.java   
/**
 * A convenience method to get the parsed type. Should not be overridden.
 *
 * @return The parsed type, e.g. URI or ISBN
 */
public final ParsedResultType getType() {
  return result.getType();
}
项目:ngCordova-demo    文件:ResultHandler.java   
/**
 * A convenience method to get the parsed type. Should not be overridden.
 *
 * @return The parsed type, e.g. URI or ISBN
 */
public final ParsedResultType getType() {
  return result.getType();
}
项目:CordovaW8BarcodeDemo    文件:ResultHandler.java   
/**
 * A convenience method to get the parsed type. Should not be overridden.
 *
 * @return The parsed type, e.g. URI or ISBN
 */
public final ParsedResultType getType() {
  return result.getType();
}
项目:zxing-android-portrait    文件:ResultHandler.java   
/**
 * A convenience method to get the parsed type. Should not be overridden.
 *
 * @return The parsed type, e.g. URI or ISBN
 */
public final ParsedResultType getType() {
  return result.getType();
}
项目:oschina-android-app    文件:ResultHandler.java   
/**
 * A convenience method to get the parsed type. Should not be overridden.
 * 
 * @return The parsed type, e.g. URI or ISBN
 */
public final ParsedResultType getType() {
    return result.getType();
}
项目:cordova-template    文件:ResultHandler.java   
/**
 * A convenience method to get the parsed type. Should not be overridden.
 *
 * @return The parsed type, e.g. URI or ISBN
 */
public final ParsedResultType getType() {
  return result.getType();
}
项目:barterli_android    文件:ResultHandler.java   
/**
 * A convenience method to get the parsed type. Should not be overridden.
 * 
 * @return The parsed type, e.g. URI or ISBN
 */
public final ParsedResultType getType() {
    return result.getType();
}
项目:oxPush    文件:ResultHandler.java   
/**
 * A convenience method to get the parsed type. Should not be overridden.
 *
 * @return The parsed type, e.g. URI or ISBN
 */
public final ParsedResultType getType() {
  return result.getType();
}
项目:hive-ios    文件:ResultHandler.java   
/**
 * A convenience method to get the parsed type. Should not be overridden.
 *
 * @return The parsed type, e.g. URI or ISBN
 */
public final ParsedResultType getType() {
  return result.getType();
}
项目:zxing_android_qr    文件:ResultHandler.java   
/**
 * A convenience method to get the parsed type. Should not be overridden.
 *
 * @return The parsed type, e.g. URI or ISBN
 */
public final ParsedResultType getType() {
  return result.getType();
}
项目:AndroidMultiChannelMiddleware    文件:ResultHandler.java   
/**
 * A convenience method to get the parsed type. Should not be overridden.
 * 
 * @return The parsed type, e.g. URI or ISBN
 */
public final ParsedResultType getType() {
    return result.getType();
}