[
https://issues.apache.org/jira/browse/CB-13200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16290691#comment-16290691
]
TSchnake edited comment on CB-13200 at 12/14/17 1:48 PM:
---------------------------------------------------------
Is there anyone who could find a solution in this matter? We are faced with the
same problem and have not found a solution yet.
Found this
hint:[https://www.ibm.com/support/knowledgecenter/en/SSHS8R_7.1.0/com.ibm.worklight.dev.doc/dev/t_android_cam_api_24.html]
Thank you for your feedback!
was (Author: tsaxino):
Is there anyone who could find a solution in this matter? We are faced with the
same problem and have not found a solution yet.
Is there any connection with the IBM MobileFirst Platform environment as
described in this link?
[https://www.ibm.com/support/knowledgecenter/en/SSHS8R_7.1.0/com.ibm.worklight.dev.doc/dev/t_android_cam_api_24.html]
Thank you for your feedback!
> Android app crash when accessing camera in release build only
> -------------------------------------------------------------
>
> Key: CB-13200
> URL: https://issues.apache.org/jira/browse/CB-13200
> Project: Apache Cordova
> Issue Type: Bug
> Components: cordova-plugin-camera
> Reporter: Kyle
> Priority: Blocker
>
> Recent changes to the camera plugin were added to use FileProvider instead of
> "file://" URIs to fix this bug originally. The changes seem to work when
> building and testing a debug apk, but (at least in my case) fail upon using a
> release build. Is anyone else seeing this?
> My project has been upgraded to the latest of cordova and the camera plugin:
> > cordova-plugin-camera 2.4.1 "Camera"
> > cordova -v
> > "7.0.1"
> If I run the project through Android Studio, everything works great. If I use
> "gradlew assembleRelease" or build a signed apk via Android Studio's
> interface, the app crashes.
> The crash occurs after choosing "Camera" from the dialog for where to source
> a photo, and then after clicking "Allow" on the Android permissions prompt
> (assuming you haven't given permissions yet.)
> Below is the full stack trace of one of the recent crashes. I believe this is
> the same exception and stack trace as the original crash that the recent
> changes in the camera plugin were fixing.
> Please let me know if you need additional details.
> Stack Trace:
> {code}
> java.lang.RuntimeException: Failure delivering result
> ResultInfo{who=@android:requestPermissions:, request=0, result=-1,
> data=Intent { act=android.content.pm.action.REQUEST_PERMISSIONS (has extras)
> }} to activity
> {edu.okstate.traditions/com.essenzasoftware.essenzaapp.MainActivity}:
> java.lang.NullPointerException: Attempt to invoke virtual method
> 'android.content.res.XmlResourceParser
> android.content.pm.PackageItemInfo.loadXmlMetaData(android.content.pm.PackageManager,
> java.lang.String)' on a null object reference
> at
> android.app.ActivityThread.deliverResults(ActivityThread.java:4090)
> at
> android.app.ActivityThread.handleSendResult(ActivityThread.java:4133)
> at
> android.app.ActivityThread.-wrap20(ActivityThread.java)
> at
> android.app.ActivityThread$H.handleMessage(ActivityThread.java:1534)
> at
> android.os.Handler.dispatchMessage(Handler.java:102)
> at
> android.os.Looper.loop(Looper.java:154)
> at
> android.app.ActivityThread.main(ActivityThread.java:6121)
> at
> java.lang.reflect.Method.invoke(Native Method)
> at
> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
> at
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
> Caused by:
> java.lang.NullPointerException: Attempt to invoke virtual method
> 'android.content.res.XmlResourceParser
> android.content.pm.PackageItemInfo.loadXmlMetaData(android.content.pm.PackageManager,
> java.lang.String)' on a null object reference
> at
> android.support.v4.content.FileProvider.b(SourceFile:583)
> at
> android.support.v4.content.FileProvider.a(SourceFile:557)
> at
> android.support.v4.content.FileProvider.a(SourceFile:399)
> at
> org.apache.cordova.camera.CameraLauncher.takePicture(SourceFile:295)
> at
> org.apache.cordova.camera.CameraLauncher.onRequestPermissionResult(SourceFile:1314)
> at
> org.apache.cordova.CordovaInterfaceImpl.onRequestPermissionResult(SourceFile:214)
> at
> com.essenzasoftware.essenzaapp.MainActivity.onRequestPermissionsResult(SourceFile:1099)
> at
> android.app.Activity.dispatchRequestPermissionsResult(Activity.java:7087)
> at
> android.app.Activity.dispatchActivityResult(Activity.java:6939)
> at
> android.app.ActivityThread.deliverResults(ActivityThread.java:4086)
> at
> android.app.ActivityThread.handleSendResult(ActivityThread.java:4133)
> at
> android.app.ActivityThread.-wrap20(ActivityThread.java)
> at
> android.app.ActivityThread$H.handleMessage(ActivityThread.java:1534)
> at
> android.os.Handler.dispatchMessage(Handler.java:102)
> at
> android.os.Looper.loop(Looper.java:154)
> at
> android.app.ActivityThread.main(ActivityThread.java:6121)
> at
> java.lang.reflect.Method.invoke(Native Method)
> at
> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
>
> at
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
> {code}
> Here is the provider section in my Manifest xml file:
> {code}
> <provider
> android:name="android.support.v4.content.FileProvider"
> android:authorities="${applicationId}.provider"
> android:exported="false"
> android:grantUriPermissions="true">
> <meta-data
> android:name="android.support.FILE_PROVIDER_PATHS"
> android:resource="@xml/provider_paths" />
> </provider>
> {code}
> And here is the provider_paths.xml relevant source:
> {code}
> <paths xmlns:android="http://schemas.android.com/apk/res/android">
> <external-path name="external_files" path="."/>
> </paths>
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]