图片到微信,QQ无法显示"/>
android分享网络图片到微信,QQ无法显示
最近在做分享功能的时候,在线图片无法显示的问题,在此记录一下
1.分享的图片路径中包含中文,将中文部分做一下编码处理就OK了,编码代码如下:
public static String encodeUrl(String url) {try {Matcher matcher = Patternpile("[\\u4e00-\\u9fa5]").matcher(url);while (matcher.find()) {String tmp = matcher.group();url = url.replaceAll(tmp, java.URLEncoder.encode(tmp, CHAR_SET));}} catch (UnsupportedEncodingException e) {e.printStackTrace();}return url;}
更多推荐
android分享网络图片到微信,QQ无法显示
发布评论