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


Java ProductParsedResult.getProductID方法代码示例

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


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

示例1: maybeInvokeRetrieval

import com.google.zxing.client.result.ProductParsedResult; //导入方法依赖的package包/类
public static void maybeInvokeRetrieval(TextView textView,
                                        ParsedResult result,
                                        HistoryManager historyManager,
                                        Context context) {
  try {
    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();
      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);
    }
  } catch (RejectedExecutionException ree) {
    // do nothing
  }
}
 
开发者ID:amap-demo,项目名称:weex-3d-map,代码行数:32,代码来源:SupplementalInfoRetriever.java

示例2: maybeInvokeRetrieval

import com.google.zxing.client.result.ProductParsedResult; //导入方法依赖的package包/类
public static void maybeInvokeRetrieval(TextView textView,
                                        ParsedResult result,
                                        Context context) {
    try {
        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();
            SupplementalInfoRetriever productRetriever =
                    new ProductResultInfoRetriever(textView, productID, context);
            productRetriever.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
        } 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);
        }
    } catch (RejectedExecutionException ree) {
        // do nothing
    }
}
 
开发者ID:xiong-it,项目名称:ZXingAndroidExt,代码行数:31,代码来源:SupplementalInfoRetriever.java

示例3: maybeInvokeRetrieval

import com.google.zxing.client.result.ProductParsedResult; //导入方法依赖的package包/类
/**
 * @author MichaelX(xiong_it)modified.{@link https://github.com/xiong-it}
 * 
 * {@link http://stackoverflow.com/questions/12227682/android-2-3-3-asynctask-call-throws-nosuchfielderror}
 * THREAD_POOL_EXECUTOR were added in API Level 11
 */
public static void maybeInvokeRetrieval(TextView textView, ParsedResult result, HistoryManager historyManager,
		Context context) {
	try {
		if (result instanceof URIParsedResult) {
			SupplementalInfoRetriever uriRetriever = new URIResultInfoRetriever(textView, (URIParsedResult) result,
					historyManager, context);
			// uriRetriever.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
			executeAsyncTask(uriRetriever);
			SupplementalInfoRetriever titleRetriever = new TitleRetriever(textView, (URIParsedResult) result,
					historyManager);
			// titleRetriever.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
			executeAsyncTask(titleRetriever);
		} else if (result instanceof ProductParsedResult) {
			ProductParsedResult productParsedResult = (ProductParsedResult) result;
			String productID = productParsedResult.getProductID();
			SupplementalInfoRetriever productRetriever = new ProductResultInfoRetriever(textView, productID,
					historyManager, context);
			// productRetriever.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
			executeAsyncTask(productRetriever);
		} else if (result instanceof ISBNParsedResult) {
			String isbn = ((ISBNParsedResult) result).getISBN();
			SupplementalInfoRetriever productInfoRetriever = new ProductResultInfoRetriever(textView, isbn,
					historyManager, context);
			// productInfoRetriever.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
			executeAsyncTask(productInfoRetriever);
			SupplementalInfoRetriever bookInfoRetriever = new BookResultInfoRetriever(textView, isbn,
					historyManager, context);
			// bookInfoRetriever.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
			executeAsyncTask(bookInfoRetriever);
		}
	} catch (RejectedExecutionException ree) {
		// do nothing
	}
}
 
开发者ID:xiong-it,项目名称:PortraitZXing,代码行数:41,代码来源:SupplementalInfoRetriever.java

示例4: 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);
  }
}
 
开发者ID:xiaowei4895,项目名称:zxing-android-portrait,代码行数:29,代码来源:SupplementalInfoRetriever.java

示例5: 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();
    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);
  }
}
 
开发者ID:mitoyarzun,项目名称:zxingfragmentlib,代码行数:28,代码来源:SupplementalInfoRetriever.java

示例6: 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);      
  }
}
 
开发者ID:FAIMS,项目名称:faims-android,代码行数:44,代码来源:SupplementalInfoRetriever.java

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

示例8: 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:pt2121,项目名称:NYC-Glass-Challenge-Oct2014,代码行数:43,代码来源:SupplementalInfoRetriever.java


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