本文整理匯總了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);
}
}
示例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);
}
示例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);
}
}
示例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);
}
}