Loading images from remote server/web

Basic Tutorials concerning: GUI, Views, Activites, XML, Layouts, Intents, ...

Postby boha » Sun Nov 01, 2009 8:34 pm

I have tried the code and also other codes with the same aim to load an immage from the web. But I get a error from the device:

The application <name> has stopped unexpectedly.

I don´t knowthe reason of this error. I have debugging the process and it´s stopped after:

ZygoteInit$MethodAndArgsCaller

Can you help me? Thanks!
boha
Once Poster
Once Poster
 
Posts: 1
Joined: Sun Nov 01, 2009 8:26 pm

Top

How to save to loaded picture

Postby base2coder » Fri Nov 06, 2009 11:31 am

Hello...Thanks for the nice tutorial....it works fine...But now i am trying to save the loaded picture in my phone memory/sd card....How can i do this? can you help me?? Thanks in advance.....
base2coder
Junior Developer
Junior Developer
 
Posts: 14
Joined: Sun Jul 12, 2009 8:54 pm

Re: Loading images from remote server/web

Postby jeni » Thu Aug 25, 2011 12:25 pm

I tried the code which you have given in this tutorial. But while executing that code i'm getting the following exception. Can u pls help me as to what modifications i have to do in the code to make the image appear in imageview?

08-25 16:46:51.404: DEBUG/SntpClient(59): request time failed: java.net.SocketException: Address family not supported by protocol
08-25 16:47:19.616: WARN/System.err(7344): java.net.SocketException: The operation timed out
08-25 16:47:19.625: WARN/System.err(7344): at org.apache.harmony.luni.platform.OSNetworkSystem.connectStreamWithTimeoutSocketImpl(Native Method)
08-25 16:47:19.634: WARN/System.err(7344): at org.apache.harmony.luni.platform.OSNetworkSystem.connect(OSNetworkSystem.java:115)
08-25 16:47:19.634: WARN/System.err(7344): at org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:244)
08-25 16:47:19.634: WARN/System.err(7344): at org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:533)
08-25 16:47:19.644: WARN/System.err(7344): at java.net.Socket.connect(Socket.java:1055)
08-25 16:47:19.644: WARN/System.err(7344): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection.<init>(HttpConnection.java:62)
08-25 16:47:19.644: WARN/System.err(7344): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnectionPool.get(HttpConnectionPool.java:88)
08-25 16:47:19.644: WARN/System.err(7344): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getHTTPConnection(HttpURLConnectionImpl.java:927)
08-25 16:47:19.644: WARN/System.err(7344): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:909)
08-25 16:47:19.654: WARN/System.err(7344): at com.example.httptest.HTTPTest.downloadFile(HTTPTest.java:74)
08-25 16:47:19.654: WARN/System.err(7344): at com.example.httptest.HTTPTest$1.onClick(HTTPTest.java:49)
08-25 16:47:19.654: WARN/System.err(7344): at android.view.View.performClick(View.java:2408)
08-25 16:47:19.664: WARN/System.err(7344): at android.view.View$PerformClick.run(View.java:8816)
08-25 16:47:19.664: WARN/System.err(7344): at android.os.Handler.handleCallback(Handler.java:587)
08-25 16:47:19.664: WARN/System.err(7344): at android.os.Handler.dispatchMessage(Handler.java:92)
jeni
Once Poster
Once Poster
 
Posts: 1
Joined: Thu Aug 25, 2011 12:05 pm

Top
Previous

Return to Novice Tutorials

Who is online

Users browsing this forum: No registered users and 7 guests