Android examples for java.net:URL
decode String with URLDecoder
import android.text.TextUtils; import java.io.UnsupportedEncodingException; import java.net.URLDecoder; import java.net.URLEncoder; import java.util.Locale; public class Main{ /**/*from w ww . j a v a 2s.co m*/ * Decode a string * * @param str * @return */ public static String decodeString(String str) { try { return URLDecoder.decode(str, "UTF-8"); } catch (UnsupportedEncodingException e) { e.printStackTrace(); return str; } } }