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
Post a Comment