Hi Mike,
i've just tried adding these few lines inside my code to hard-debug
it:
Log.d("stream",""+is.available());
Log.d("stream",is.toString());
Log.d("bstream",""+bis.available());
Log.d("bstream",bis.toString());
if(is==null)
Log.d("stream","is null");
and debugger says me:
09-30 15:41:52.605: DEBUG/3(951): /sdcard/app/img/7.jpg
09-30 15:41:52.615: DEBUG/stream(951): 22080
09-30 15:41:52.615: DEBUG/stream(951):
[EMAIL PROTECTED]
09-30 15:41:52.645: DEBUG/bstream(951): 22080
09-30 15:41:52.645: DEBUG/bstream(951):
[EMAIL PROTECTED]
So i think it works fine and it's not null, but I still get the same
error using bis and is input for bitmapdecode:
09-30 15:46:57.916: WARN/System.err(2066):
java.lang.NullPointerException
09-30 15:46:57.916: WARN/System.err(2066): at
com.app.Galleria.onCreate(Galleria.java:97)
09-30 15:46:57.916: WARN/System.err(2066): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1122)
09-30 15:46:57.916: WARN/System.err(2066): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2103)
09-30 15:46:57.925: WARN/System.err(2066): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2156)
09-30 15:46:57.925: WARN/System.err(2066): at
android.app.ActivityThread.access$1800(ActivityThread.java:112)
09-30 15:46:57.925: WARN/System.err(2066): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1580)
09-30 15:46:57.925: WARN/System.err(2066): at
android.os.Handler.dispatchMessage(Handler.java:88)
09-30 15:46:57.935: WARN/System.err(2066): at
android.os.Looper.loop(Looper.java:123)
09-30 15:46:57.935: WARN/System.err(2066): at
android.app.ActivityThread.main(ActivityThread.java:3742)
09-30 15:46:57.935: WARN/System.err(2066): at
java.lang.reflect.Method.invokeNative(Native Method)
09-30 15:46:57.935: WARN/System.err(2066): at
java.lang.reflect.Method.invoke(Method.java:515)
09-30 15:46:57.945: WARN/System.err(2066): at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:739)
09-30 15:46:57.945: WARN/System.err(2066): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497)
09-30 15:46:57.945: WARN/System.err(2066): at
dalvik.system.NativeStart.main(Native Method)
And line 97 in Galleria.java is: photos[i] =
BitmapFactory.decodeStream(is);
On 30 Set, 15:09, Mike Reed <[EMAIL PROTECTED]> wrote:
> That is a correct way to call decodeStream. Are you sure the path is
> correct (i.e. are you getting a non-null fileinputstream)?
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---