android - Loading custom url in webview -
in app, loading "http" url in webview. url loaded correctly, there internal url's loaded protocol "sheet://". while loading url error "protocol isn't supported". can please how fix this? how load url's protocol "sheet://" ?
ps: using shouldoverrideurlloading method load url.
this code using
public boolean shouldoverrideurlloading(webview view, string url) { if(url.contains("sheet://")){ intent url_intent = new intent ( intent.action_view,uri.parse(url)); url_intent.addcategory(intent.category_browsable); startactivity(url_intent); return false; }else{ view.loadurl(url); return true; } }
thanks & regards,
perhaps host php file, header?
<?php header("location: sheet://link_to_your_file.extention"); ?>
Comments
Post a Comment