Java Code Examples for com.google.zxing.client.android.LocaleManager#getProductSearchCountryTLD()
The following examples show how to use
com.google.zxing.client.android.LocaleManager#getProductSearchCountryTLD() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ProductResultInfoRetriever.java From ZXing-Standalone-library with Apache License 2.0 | 6 votes |
@Override void retrieveSupplementalInfo() throws IOException { String encodedProductID = URLEncoder.encode(productID, "UTF-8"); String uri = "https://www.google." + LocaleManager.getProductSearchCountryTLD(context) + "/m/products?ie=utf8&oe=utf8&scoring=p&source=zxing&q=" + encodedProductID; CharSequence content = HttpHelper.downloadViaHttp(uri, HttpHelper.ContentType.HTML); for (Pattern p : PRODUCT_NAME_PRICE_PATTERNS) { Matcher matcher = p.matcher(content); if (matcher.find()) { append(productID, source, new String[] { unescapeHTML(matcher.group(1)), unescapeHTML(matcher.group(2)) }, uri); break; } } }
Example 2
Source File: ProductResultInfoRetriever.java From analyzer-of-android-for-Apache-Weex with Apache License 2.0 | 6 votes |
@Override void retrieveSupplementalInfo() throws IOException { String encodedProductID = URLEncoder.encode(productID, "UTF-8"); String uri = "https://www.google." + LocaleManager.getProductSearchCountryTLD(context) + "/m/products?ie=utf8&oe=utf8&scoring=p&source=zxing&q=" + encodedProductID; CharSequence content = HttpHelper.downloadViaHttp(uri, HttpHelper.ContentType.HTML); for (Pattern p : PRODUCT_NAME_PRICE_PATTERNS) { Matcher matcher = p.matcher(content); if (matcher.find()) { append(productID, source, new String[] { unescapeHTML(matcher.group(1)), unescapeHTML(matcher.group(2)) }, uri); break; } } }
Example 3
Source File: ProductResultInfoRetriever.java From weex with Apache License 2.0 | 6 votes |
@Override void retrieveSupplementalInfo() throws IOException { String encodedProductID = URLEncoder.encode(productID, "UTF-8"); String uri = "https://www.google." + LocaleManager.getProductSearchCountryTLD(context) + "/m/products?ie=utf8&oe=utf8&scoring=p&source=zxing&q=" + encodedProductID; CharSequence content = HttpHelper.downloadViaHttp(uri, HttpHelper.ContentType.HTML); for (Pattern p : PRODUCT_NAME_PRICE_PATTERNS) { Matcher matcher = p.matcher(content); if (matcher.find()) { append(productID, source, new String[] { unescapeHTML(matcher.group(1)), unescapeHTML(matcher.group(2)) }, uri); break; } } }
Example 4
Source File: ProductResultInfoRetriever.java From Study_Android_Demo with Apache License 2.0 | 6 votes |
@Override void retrieveSupplementalInfo() throws IOException { String encodedProductID = URLEncoder.encode(productID, "UTF-8"); String uri = "https://www.google." + LocaleManager.getProductSearchCountryTLD(context) + "/m/products?ie=utf8&oe=utf8&scoring=p&source=zxing&q=" + encodedProductID; CharSequence content = HttpHelper.downloadViaHttp(uri, HttpHelper.ContentType.HTML); for (Pattern p : PRODUCT_NAME_PRICE_PATTERNS) { Matcher matcher = p.matcher(content); if (matcher.find()) { append(productID, source, new String[] { unescapeHTML(matcher.group(1)), unescapeHTML(matcher.group(2)) }, uri); break; } } }
Example 5
Source File: ProductResultInfoRetriever.java From barcodescanner-lib-aar with MIT License | 6 votes |
@Override void retrieveSupplementalInfo() throws IOException { String encodedProductID = URLEncoder.encode(productID, "UTF-8"); String uri = "https://www.google." + LocaleManager.getProductSearchCountryTLD(context) + "/m/products?ie=utf8&oe=utf8&scoring=p&source=zxing&q=" + encodedProductID; CharSequence content = HttpHelper.downloadViaHttp(uri, HttpHelper.ContentType.HTML); for (Pattern p : PRODUCT_NAME_PRICE_PATTERNS) { Matcher matcher = p.matcher(content); if (matcher.find()) { append(productID, source, new String[] { unescapeHTML(matcher.group(1)), unescapeHTML(matcher.group(2)) }, uri); break; } } }
Example 6
Source File: ProductResultInfoRetriever.java From reacteu-app with MIT License | 6 votes |
@Override void retrieveSupplementalInfo() throws IOException { String encodedProductID = URLEncoder.encode(productID, "UTF-8"); String uri = "http://www.google." + LocaleManager.getProductSearchCountryTLD(context) + "/m/products?ie=utf8&oe=utf8&scoring=p&source=zxing&q=" + encodedProductID; CharSequence content = HttpHelper.downloadViaHttp(uri, HttpHelper.ContentType.HTML); for (Pattern p : PRODUCT_NAME_PRICE_PATTERNS) { Matcher matcher = p.matcher(content); if (matcher.find()) { append(productID, source, new String[] { unescapeHTML(matcher.group(1)), unescapeHTML(matcher.group(2)) }, uri); break; } } }
Example 7
Source File: ProductResultInfoRetriever.java From android-apps with MIT License | 6 votes |
@Override void retrieveSupplementalInfo() throws IOException, InterruptedException { String encodedProductID = URLEncoder.encode(productID, "UTF-8"); String uri = "http://www.google." + LocaleManager.getProductSearchCountryTLD(context) + "/m/products?ie=utf8&oe=utf8&scoring=p&source=zxing&q=" + encodedProductID; String content = HttpHelper.downloadViaHttp(uri, HttpHelper.ContentType.HTML); Matcher matcher = PRODUCT_NAME_PRICE_PATTERN.matcher(content); if (matcher.find()) { append(productID, source, new String[] { unescapeHTML(matcher.group(1)), unescapeHTML(matcher.group(2)) }, uri); } }
Example 8
Source File: ProductResultInfoRetriever.java From zxingfragmentlib with Apache License 2.0 | 6 votes |
@Override void retrieveSupplementalInfo() throws IOException { String encodedProductID = URLEncoder.encode(productID, "UTF-8"); String uri = "https://www.google." + LocaleManager.getProductSearchCountryTLD(context) + "/m/products?ie=utf8&oe=utf8&scoring=p&source=zxing&q=" + encodedProductID; CharSequence content = HttpHelper.downloadViaHttp(uri, HttpHelper.ContentType.HTML); for (Pattern p : PRODUCT_NAME_PRICE_PATTERNS) { Matcher matcher = p.matcher(content); if (matcher.find()) { append(productID, source, new String[] { unescapeHTML(matcher.group(1)), unescapeHTML(matcher.group(2)) }, uri); break; } } }