Android Question Camera intent issue

Sasuke Sama

Active Member
Licensed User
hi
im trying to use the camera intent in my project but having some issues that im not sure what causing it
using the example in the post it works fine
but copying the exact same example to my project giving me this error
B4X:
fileprovider_getfileuri (java line: 72)
java.lang.reflect.InvocationTargetException
   at java.lang.reflect.Method.invoke(Native Method)
   at anywheresoftware.b4j.object.JavaObject.RunMethod(JavaObject.java:131)
   at com.hyokosoft.riq.fileprovider._getfileuri(fileprovider.java:72)
   at com.hyokosoft.riq.cam._takepicture(cam.java:482)
   at com.hyokosoft.riq.cam._button1_click(cam.java:378)
   at java.lang.reflect.Method.invoke(Native Method)
   at anywheresoftware.b4a.BA.raiseEvent2(BA.java:191)
   at anywheresoftware.b4a.BA.raiseEvent2(BA.java:175)
   at anywheresoftware.b4a.BA.raiseEvent(BA.java:171)
   at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:80)
   at android.view.View.performClick(View.java:6614)
   at android.view.View.performClickInternal(View.java:6591)
   at android.view.View.access$3100(View.java:786)
   at android.view.View$PerformClick.run(View.java:25948)
   at android.os.Handler.handleCallback(Handler.java:873)
   at android.os.Handler.dispatchMessage(Handler.java:99)
   at android.os.Looper.loop(Looper.java:201)
   at android.app.ActivityThread.main(ActivityThread.java:6806)
   at java.lang.reflect.Method.invoke(Native Method)
   at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
Caused by: java.lang.IllegalArgumentException: Failed to find configured root that contains /data/data/com.hyokosoft.riq/files/shared/tempimage.jpg
   at android.support.v4.content.FileProvider$SimplePathStrategy.getUriForFile(FileProvider.java:739)
   at android.support.v4.content.FileProvider.getUriForFile(FileProvider.java:418)
   ... 21 more
 

Sasuke Sama

Active Member
Licensed User
you fileprovider definition seems to be wrong or you are not using the fileprovider correctly.
I just copied - past the code from the cameraintent example and put it in its own activity to avoid any conflict so it should work but for some reason isnt
I included both the fileprovider class and the starter service as well from the example but still. :(
 
Top