Android Question error no space left

Douglas Farias

Expert
Licensed User
Longtime User
hi i m using a camera exemple
http://www.basic4ppc.com/android/fo...amera-library-functionality.23801/#post137749

and i have a error when i press take a pitcure
i know this error is obvious is because my space on device
but how can i convert this error to a msgbox

for all peoples when dont have space show a msgbox and no this error?
how can i change this error to a msgbox("error", "erro")?

error log

LogCat connected to: B4A-Bridge: alps S6-123456789026263
--------- beginning of /dev/log/system
--------- beginning of /dev/log/main
java.io.FileNotFoundException: /mnt/sdcard/1.jpg: open failed: ENOSPC (No space left on device)
at libcore.io.IoBridge.open(IoBridge.java:448)
at java.io.FileOutputStream.<init>(FileOutputStream.java:88)
at anywheresoftware.b4a.objects.streams.File.OpenOutput(File.java:348)
at anywheresoftware.b4a.samples.camera.cameraexclass._savepicturetofile(cameraexclass.java:447)
at anywheresoftware.b4a.samples.camera.main._camera1_picturetaken(main.java:407)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:173)
at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:858)
at anywheresoftware.b4a.keywords.Common.CallSubNew2(Common.java:815)
at anywheresoftware.b4a.samples.camera.cameraexclass._camera_picturetaken(cameraexclass.java:76)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:173)
at anywheresoftware.b4a.BA$2.run(BA.java:283)
at android.os.Handler.handleCallback(Handler.java:605)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4508)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:809)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:576)
at dalvik.system.NativeStart.main(Native Method)
Caused by: libcore.io.ErrnoException: open failed: ENOSPC (No space left on device)
at libcore.io.Posix.open(Native Method)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110)
at libcore.io.IoBridge.open(IoBridge.java:432)
... 23 more
java.io.FileNotFoundException: /mnt/sdcard/1.jpg: open failed: ENOSPC (No space left on device)
 

Douglas Farias

Expert
Licensed User
Longtime User
have you a exemple NJ?
i m not programmer i m learning =(
all samples and tutorials are apreciated *-*
thx again
 
Upvote 0
Top