Java Code Examples for android.net.Uri.Builder#appendEncodedPath()

The following examples show how to use android.net.Uri.Builder#appendEncodedPath() . 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: UriUtils.java    From line-sdk-android with Apache License 2.0 5 votes vote down vote up
public static Uri.Builder uriBuilder(@NonNull final Uri baseUri,
                                     @NonNull final String... newPathSegments) {
    final Builder builder = baseUri.buildUpon();

    for (final String path : newPathSegments) {
        builder.appendEncodedPath(path);
    }

    return builder;
}
 
Example 2
Source File: ProtocolBuilder.java    From letv with Apache License 2.0 5 votes vote down vote up
protected Builder getBuilder(String path, String key, String value) {
    Builder ub = new Builder();
    ub.appendEncodedPath(path);
    append(ub, key, value);
    addCommonParam(ub);
    return ub;
}
 
Example 3
Source File: ProtocolBuilder.java    From letv with Apache License 2.0 4 votes vote down vote up
protected Builder getBuilder(String host, String path) {
    Builder ub = new Builder().scheme(IDataSource.SCHEME_HTTP_TAG).authority(host);
    ub.appendEncodedPath(path);
    addCommonParam(ub);
    return ub;
}
 
Example 4
Source File: ProtocolBuilder.java    From letv with Apache License 2.0 4 votes vote down vote up
protected Builder getBuilder(String path) {
    Builder ub = new Builder();
    ub.appendEncodedPath(path);
    addCommonParam(ub);
    return ub;
}