android - Loading an image of a website that contains redirects -


i doing small app fun while playing around uis , several other things in android studio. tried load image based on url code:

httpurlconnection connection = (httpurlconnection) url.openconnection(); connection.setallowuserinteraction(false); connection.setrequestmethod("get"); connection.connect(); inputstream input = connection.getinputstream(); bitmap mybitmap = bitmapfactory.decodestream(input); 

however throw filenotfoundexception urls. guessing due webpage checking client conditions. 1 example image: https://kissanime.to/content/mobile/images/logo.png works fine when loading via webbrowser though. not own page, not know causing issues. there way debug/solve this?

//edit: seems website returns 503 statuscode when using httpurlconnection
//edit 2: after inspecting response message seems webpage contains type of javascript loads image after 5 second delay


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -

java - Digest auth with Spring Security using javaconfig -