I have this:
final String mimeType = "text/html";
final String encoding = "utf-8";
String data = "<img src='blabla.jpg' width='90%' />";
WebView webview = (WebView)findViewById(R.id.webView1);
webview.loadData(summary, mimeType, encoding);
And this give me error: “Web page not availible”. When I delete “%” it works.
How to print this percent?
As per the documentation for loadData
“If the value of the encoding parameter is ‘base64’, then the data must be encoded as base64. Otherwise, the data must use ASCII encoding for octets inside the range of safe URL characters and use the standard %xx hex encoding of URLs for octets outside that range. For example, ‘#’, ‘%’, ‘\’, ‘?’ should be replaced by %23, %25, %27, %3f respectively. “
so change your data string to be