本文整理汇总了Java中com.google.zxing.client.result.ProductParsedResult.getNormalizedProductID方法的典型用法代码示例。如果您正苦于以下问题:Java ProductParsedResult.getNormalizedProductID方法的具体用法?Java ProductParsedResult.getNormalizedProductID怎么用?Java ProductParsedResult.getNormalizedProductID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.zxing.client.result.ProductParsedResult
的用法示例。
在下文中一共展示了ProductParsedResult.getNormalizedProductID方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: maybeInvokeRetrieval
import com.google.zxing.client.result.ProductParsedResult; //导入方法依赖的package包/类
public static void maybeInvokeRetrieval(TextView textView,
ParsedResult result,
HistoryManager historyManager,
Context context) {
if (result instanceof URIParsedResult) {
SupplementalInfoRetriever uriRetriever =
new URIResultInfoRetriever(textView, (URIParsedResult) result, historyManager, context);
uriRetriever.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
SupplementalInfoRetriever titleRetriever =
new TitleRetriever(textView, (URIParsedResult) result, historyManager);
titleRetriever.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
} else if (result instanceof ProductParsedResult) {
ProductParsedResult productParsedResult = (ProductParsedResult) result;
String productID = productParsedResult.getProductID();
String normalizedProductID = productParsedResult.getNormalizedProductID();
SupplementalInfoRetriever productRetriever =
new ProductResultInfoRetriever(textView, productID, historyManager, context);
productRetriever.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
} else if (result instanceof ISBNParsedResult) {
String isbn = ((ISBNParsedResult) result).getISBN();
SupplementalInfoRetriever productInfoRetriever =
new ProductResultInfoRetriever(textView, isbn, historyManager, context);
productInfoRetriever.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
SupplementalInfoRetriever bookInfoRetriever =
new BookResultInfoRetriever(textView, isbn, historyManager, context);
bookInfoRetriever.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
}
}
示例2: maybeInvokeRetrieval
import com.google.zxing.client.result.ProductParsedResult; //导入方法依赖的package包/类
public static void maybeInvokeRetrieval(TextView textView,
ParsedResult result,
HistoryManager historyManager,
Context context) {
if (result instanceof URIParsedResult) {
SupplementalInfoRetriever uriRetriever =
new URIResultInfoRetriever(textView, (URIParsedResult) result, historyManager, context);
uriRetriever.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
SupplementalInfoRetriever titleRetriever =
new TitleRetriever(textView, (URIParsedResult) result, historyManager);
titleRetriever.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
} else if (result instanceof ProductParsedResult) {
ProductParsedResult productParsedResult = (ProductParsedResult) result;
String productID = productParsedResult.getProductID();
String normalizedProductID = productParsedResult.getNormalizedProductID();
SupplementalInfoRetriever productRetriever =
new ProductResultInfoRetriever(textView, productID, historyManager, context);
productRetriever.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
switch (productID.length()) {
case 12:
SupplementalInfoRetriever upcInfoRetriever =
new AmazonInfoRetriever(textView, "UPC", normalizedProductID, historyManager, context);
upcInfoRetriever.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
break;
case 13:
SupplementalInfoRetriever eanInfoRetriever =
new AmazonInfoRetriever(textView, "EAN", normalizedProductID, historyManager, context);
eanInfoRetriever.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
break;
}
} else if (result instanceof ISBNParsedResult) {
String isbn = ((ISBNParsedResult) result).getISBN();
SupplementalInfoRetriever productInfoRetriever =
new ProductResultInfoRetriever(textView, isbn, historyManager, context);
productInfoRetriever.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
SupplementalInfoRetriever bookInfoRetriever =
new BookResultInfoRetriever(textView, isbn, historyManager, context);
bookInfoRetriever.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
SupplementalInfoRetriever amazonInfoRetriever =
new AmazonInfoRetriever(textView, "ISBN", isbn, historyManager, context);
amazonInfoRetriever.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
}
}
示例3: maybeInvokeRetrieval
import com.google.zxing.client.result.ProductParsedResult; //导入方法依赖的package包/类
public static void maybeInvokeRetrieval(TextView textView,
ParsedResult result,
Context context) {
if (result instanceof URIParsedResult) {
SupplementalInfoRetriever uriRetriever =
new URIResultInfoRetriever(textView, (URIParsedResult) result, context);
uriRetriever.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
SupplementalInfoRetriever titleRetriever =
new TitleRetriever(textView, (URIParsedResult) result);
titleRetriever.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
} else if (result instanceof ProductParsedResult) {
ProductParsedResult productParsedResult = (ProductParsedResult) result;
String productID = productParsedResult.getProductID();
String normalizedProductID = productParsedResult.getNormalizedProductID();
SupplementalInfoRetriever productRetriever =
new ProductResultInfoRetriever(textView, productID, context);
productRetriever.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
switch (productID.length()) {
case 12:
SupplementalInfoRetriever upcInfoRetriever =
new AmazonInfoRetriever(textView, "UPC", normalizedProductID, context);
upcInfoRetriever.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
break;
case 13:
SupplementalInfoRetriever eanInfoRetriever =
new AmazonInfoRetriever(textView, "EAN", normalizedProductID, context);
eanInfoRetriever.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
break;
}
} else if (result instanceof ISBNParsedResult) {
String isbn = ((ISBNParsedResult) result).getISBN();
SupplementalInfoRetriever productInfoRetriever =
new ProductResultInfoRetriever(textView, isbn, context);
productInfoRetriever.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
SupplementalInfoRetriever bookInfoRetriever =
new BookResultInfoRetriever(textView, isbn, context);
bookInfoRetriever.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
SupplementalInfoRetriever amazonInfoRetriever =
new AmazonInfoRetriever(textView, "ISBN", isbn, context);
amazonInfoRetriever.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
}
}
开发者ID:corneliudascalu,项目名称:google-glass-share-barcode-bluetooth,代码行数:43,代码来源:SupplementalInfoRetriever.java
示例4: maybeInvokeRetrieval
import com.google.zxing.client.result.ProductParsedResult; //导入方法依赖的package包/类
public static void maybeInvokeRetrieval(TextView textView,
ParsedResult result,
Context context) {
if (result instanceof URIParsedResult) {
SupplementalInfoRetriever uriRetriever =
new URIResultInfoRetriever(textView, (URIParsedResult) result, context);
uriRetriever.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
SupplementalInfoRetriever titleRetriever =
new TitleRetriever(textView, (URIParsedResult) result);
titleRetriever.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
} else if (result instanceof ProductParsedResult) {
ProductParsedResult productParsedResult = (ProductParsedResult) result;
String productID = productParsedResult.getProductID();
String normalizedProductID = productParsedResult.getNormalizedProductID();
SupplementalInfoRetriever productRetriever =
new ProductResultInfoRetriever(textView, productID, context);
productRetriever.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
switch (productID.length()) {
case 12:
SupplementalInfoRetriever upcInfoRetriever =
new AmazonInfoRetriever(textView, "UPC", normalizedProductID, context);
upcInfoRetriever.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
break;
case 13:
SupplementalInfoRetriever eanInfoRetriever =
new AmazonInfoRetriever(textView, "EAN", normalizedProductID, context);
eanInfoRetriever.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
break;
}
} else if (result instanceof ISBNParsedResult) {
String isbn = ((ISBNParsedResult) result).getISBN();
SupplementalInfoRetriever productInfoRetriever =
new ProductResultInfoRetriever(textView, isbn, context);
productInfoRetriever.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
SupplementalInfoRetriever bookInfoRetriever =
new BookResultInfoRetriever(textView, isbn, context);
bookInfoRetriever.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
SupplementalInfoRetriever amazonInfoRetriever =
new AmazonInfoRetriever(textView, "ISBN", isbn, context);
amazonInfoRetriever.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
}
}