本文整理汇总了Java中android.net.Uri.getQueryParameters方法的典型用法代码示例。如果您正苦于以下问题:Java Uri.getQueryParameters方法的具体用法?Java Uri.getQueryParameters怎么用?Java Uri.getQueryParameters使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.net.Uri
的用法示例。
在下文中一共展示了Uri.getQueryParameters方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: parseDecodeFormats
import android.net.Uri; //导入方法依赖的package包/类
static Vector<BarcodeFormat> parseDecodeFormats(Uri inputUri) {
List<String> formats = inputUri.getQueryParameters(Intents.Scan.SCAN_FORMATS);
if (formats != null && formats.size() == 1 && formats.get(0) != null){
formats = Arrays.asList(COMMA_PATTERN.split(formats.get(0)));
}
return parseDecodeFormats(formats, inputUri.getQueryParameter(Intents.Scan.MODE));
}
示例2: parseDecodeFormats
import android.net.Uri; //导入方法依赖的package包/类
static Vector<BarcodeFormat> parseDecodeFormats(Uri inputUri) {
List<String> formats = inputUri.getQueryParameters(Intents.Scan.SCAN_FORMATS);
if (formats != null && formats.size() == 1 && formats.get(0) != null) {
formats = Arrays.asList(COMMA_PATTERN.split(formats.get(0)));
}
return parseDecodeFormats(formats, inputUri.getQueryParameter(Intents.Scan.MODE));
}
示例3: parseDecodeFormats
import android.net.Uri; //导入方法依赖的package包/类
static Collection<BarcodeFormat> parseDecodeFormats(Uri inputUri) {
List<String> formats = inputUri.getQueryParameters(Intents.Scan.FORMATS);
if (formats != null && formats.size() == 1 && formats.get(0) != null){
formats = Arrays.asList(COMMA_PATTERN.split(formats.get(0)));
}
return parseDecodeFormats(formats, inputUri.getQueryParameter(Intents.Scan.MODE));
}
示例4: parseDecodeFormats
import android.net.Uri; //导入方法依赖的package包/类
static Set<BarcodeFormat> parseDecodeFormats(Uri inputUri) {
List<String> formats = inputUri.getQueryParameters(Intents.Scan.FORMATS);
if (formats != null && formats.size() == 1 && formats.get(0) != null) {
formats = Arrays.asList(COMMA_PATTERN.split(formats.get(0)));
}
return parseDecodeFormats(formats, inputUri.getQueryParameter(Intents.Scan.MODE));
}
示例5: getQueryParams
import android.net.Uri; //导入方法依赖的package包/类
private static Map<String, String> getQueryParams(Request<?> request) {
Uri uri = Uri.parse(request.getUrl());
Map<String, String> result = new HashMap<>();
for (String key : uri.getQueryParameterNames()) {
for (String value : uri.getQueryParameters(key)) {
if (result.containsKey(key)) {
result.put(key, result.get(key) + ";" + value);
} else {
result.put(key, value);
}
}
}
return result;
}
示例6: parseDecodeFormats
import android.net.Uri; //导入方法依赖的package包/类
static Set<BarcodeFormat> parseDecodeFormats(Uri inputUri) {
List<String> formats = inputUri.getQueryParameters(Intents.Scan.FORMATS);
if (formats != null && formats.size() == 1 && formats.get(0) != null) {
formats = Arrays.asList(COMMA_PATTERN.split(formats.get(0)));
}
return parseDecodeFormats(formats, inputUri.getQueryParameter(Intents.Scan.MODE));
}
示例7: parseDecodeFormats
import android.net.Uri; //导入方法依赖的package包/类
public static Set<BarcodeFormat> parseDecodeFormats(Uri inputUri) {
List<String> formats = inputUri.getQueryParameters(Intents.Scan.FORMATS);
if (formats != null && formats.size() == 1 && formats.get(0) != null){
formats = Arrays.asList(COMMA_PATTERN.split(formats.get(0)));
}
return parseDecodeFormats(formats, inputUri.getQueryParameter(Intents.Scan.MODE));
}
示例8: parseDecodeFormats
import android.net.Uri; //导入方法依赖的package包/类
public static Vector<BarcodeFormat> parseDecodeFormats(Uri inputUri) {
List<String> formats = inputUri.getQueryParameters(Intents.Scan.SCAN_FORMATS);
if (formats != null && formats.size() == 1 && formats.get(0) != null) {
formats = Arrays.asList(COMMA_PATTERN.split(formats.get(0)));
}
return parseDecodeFormats(formats, inputUri.getQueryParameter(Intents.Scan.MODE));
}
示例9: from
import android.net.Uri; //导入方法依赖的package包/类
public static UrlBuilder from(Uri uri) {
UrlQuery query = new UrlQuery();
Set<String> queryKeys = uri.getQueryParameterNames();
for (String queryKey : queryKeys) {
List<String> queryValues = uri.getQueryParameters(queryKey);
for (String queryValue : queryValues) {
query.append(queryKey, queryValue);
}
}
return from(uri.getScheme(), uri.getHost(), uri.getPort(), UrlPath.parse(uri.getPath()), query, uri.getFragment());
}