Android examples for android.net:Uri
encode URI by replacing string
import android.net.Uri; public class Main{ public static String encodeURI(String encoded) { encoded = encoded.replace("(", "%28"); encoded = encoded.replace(")", "%29"); encoded = encoded.replace("!", "%21"); encoded = encoded.replace("\'", "%27"); encoded = encoded.replace("*", "%2A"); return encoded; }//from ww w. j a va 2 s . c om }