i'm developing simple app android display images in webview.
while coding problem load data in webview. when try load data like:
string data =
"<html><body><img src="http://xxxxxxxxxxx"/></body></html>";
webview.loaddata(data, "text/html", "utf-8");
the image can't loaded because link in src="" redericting me page contains not image full web page.
the example is:
image http://i1.kwejk.pl/site_media/obrazki/02491-77d715da62fe976.jpg
when try load image redirect me page
it's working in desktop browser, phone etc.
is there solution disable redirecting page when loading image??
please help.
they on purpose other users don't link content directly.
the answer is: depends how it. in case seems use cookies. first time visit link redirected, second time shows picture directly.
so, workaround httpclient get, handle redirect , remember cookies. use cookies in subsequent webview calls site.
update: seem use per-page cookies, means need pre-fetch cookie every image.
Comments
Post a Comment