本文整理汇总了Java中com.google.zxing.client.android.LocaleManager.getProductSearchCountryTLD方法的典型用法代码示例。如果您正苦于以下问题:Java LocaleManager.getProductSearchCountryTLD方法的具体用法?Java LocaleManager.getProductSearchCountryTLD怎么用?Java LocaleManager.getProductSearchCountryTLD使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.zxing.client.android.LocaleManager
的用法示例。
在下文中一共展示了LocaleManager.getProductSearchCountryTLD方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: retrieveSupplementalInfo
import com.google.zxing.client.android.LocaleManager; //导入方法依赖的package包/类
@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;
}
}
}
示例2: retrieveSupplementalInfo
import com.google.zxing.client.android.LocaleManager; //导入方法依赖的package包/类
@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;
}
}
}
示例3: retrieveSupplementalInfo
import com.google.zxing.client.android.LocaleManager; //导入方法依赖的package包/类
@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;
}
}
}
示例4: retrieveSupplementalInfo
import com.google.zxing.client.android.LocaleManager; //导入方法依赖的package包/类
@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;
}
}
}