Trying to change the profile image on the web view. But when trying the updated image showing a crashed image.
webView.loadUrl("javascript: (function() {document.getElementById('SelectedImage').src='"+profilePath+"';}) ();");
If profilePath
is a Uri object, then you need to get the absolute path from the object.
Use File f = new File(profilePath.toString());
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.