Here you can find the source of resolveRelativeUri(Uri sourceUri, String relativeUri)
public static Uri resolveRelativeUri(Uri sourceUri, String relativeUri) throws MalformedURLException
//package com.java2s; import java.net.MalformedURLException; import java.net.URL; import android.net.Uri; public class Main { public static Uri resolveRelativeUri(Uri sourceUri, String relativeUri) throws MalformedURLException { URL source = new URL(sourceUri.toString()); URL absolute = new URL(source, relativeUri); return Uri.parse(absolute.toString()); }/*from w w w. j a v a 2s . c o m*/ }