Why am I getting null when trying to decode file from URL to post to Facebook from Android app -


this code:

        byte[] data;         bitmap bi = bitmapfactory.decodefile(myimageurl);         bytearrayoutputstream baos = new bytearrayoutputstream();         bi.compress(bitmap.compressformat.png, 100, baos);         data = baos.tobytearray(); 

a detail that, in logcat, see error:

java.io.filenotfoundexception: <image url> (no such file or directory) 

after this, null pointer exception because variavle bi null. url contains image. why happens?

thank you!


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

keyboard - C++ GetAsyncKeyState alternative -

android - java.net.UnknownHostException(Unable to resolve host “URL”: No address associated with hostname) -