Greetings,
I'm using the intent based camera and discovered the app crashes if the user taps the back button on their phone when the camera app is displayed on the screen.
Everything else works. In our app the user taps a camera button. the intend based camera takes a photo, then returns back to the original screen if the user taps the Ok button on the camera app. I also checked the folder for the photo and it's there.
I also tried this with other camera apps and the same crash happens. No error messages are displayed on the screen so I ran the app so it would record the logs which I'm listing here.
All help will be appreciated.
Thanks.
I'm using the intent based camera and discovered the app crashes if the user taps the back button on their phone when the camera app is displayed on the screen.
Everything else works. In our app the user taps a camera button. the intend based camera takes a photo, then returns back to the original screen if the user taps the Ok button on the camera app. I also checked the folder for the photo and it's there.
I also tried this with other camera apps and the same crash happens. No error messages are displayed on the screen so I ran the app so it would record the logs which I'm listing here.
All help will be appreciated.
Thanks.
B4X:
Logger connected to: samsung SM-G960U1
--------- beginning of crash
--------- beginning of main
** Activity (main) Pause, UserClosed = false **
sending message to waiting queue (OnActivityResult)
running waiting messages (1)
The path: /storage/emulated/0/DCIM
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Service (starter) Destroy (ignored)**
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
sending message to waiting queue (OnActivityResult)
running waiting messages (1)
The path: /storage/emulated/0/DCIM
main_ion_event (java line: 966)
java.io.FileNotFoundException: /storage/emulated/0/Android/data/synventive.ebb.ui/files/shared/tempimage.jpg (No such file or directory)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:231)
at java.io.FileInputStream.<init>(FileInputStream.java:165)
at anywheresoftware.b4a.objects.streams.File.OpenInput(File.java:214)
at anywheresoftware.b4a.objects.streams.File.Copy(File.java:340)
at synventive.ebb.ui.main._ion_event(main.java:966)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:196)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:176)
at anywheresoftware.b4j.object.JavaObject$1.invoke(JavaObject.java:237)
at java.lang.reflect.Proxy.invoke(Proxy.java:1006)
at $Proxy0.ResultArrived(Unknown Source)
at anywheresoftware.b4a.BA$4.run(BA.java:568)
at anywheresoftware.b4a.BA.setActivityPaused(BA.java:442)
at synventive.ebb.ui.main$ResumeMessage.run(main.java:306)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:6986)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1445)
Copying updated assets files (7)
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
sending message to waiting queue (OnActivityResult)
running waiting messages (1)
The path: /storage/emulated/0/DCIM
Error occurred on line: 590 (Main)
java.io.FileNotFoundException: /storage/emulated/0/Android/data/synventive.ebb.ui/files/shared/tempimage.jpg (No such file or directory)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:231)
at java.io.FileInputStream.<init>(FileInputStream.java:165)
at anywheresoftware.b4a.objects.streams.File.OpenInput(File.java:214)
at anywheresoftware.b4a.objects.streams.File.Copy(File.java:340)
at synventive.ebb.ui.main._ion_event(main.java:1175)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:348)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:176)
at anywheresoftware.b4j.object.JavaObject$1.invoke(JavaObject.java:237)
at java.lang.reflect.Proxy.invoke(Proxy.java:1006)
at $Proxy0.ResultArrived(Unknown Source)
at anywheresoftware.b4a.BA$4.run(BA.java:568)
at anywheresoftware.b4a.BA.setActivityPaused(BA.java:442)
at synventive.ebb.ui.main$ResumeMessage.run(main.java:306)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:6986)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1445)
** Activity (main) Resume **