2

For a cordova/phonegap app, I am using cordova-plugin-camera to fetch local files. and when invoking the navigator.camera.getPicture in android 6.0.1 devices a permission pop up appears asking permission to access files. On granting the permission its working. But when I deny the permission the app crashes. App gets closed and restarts automatically. Please help me to sort out the issue.

Thanks.

mobiledevnewbie
  • 657
  • 1
  • 5
  • 10

1 Answers1

0

Here is the provider section in my Manifest XML file. You should add it inside the <application></application> tag

<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="ibas.provider"
android:exported="false"
android:grantUriPermissions="true">
    <meta-data
        android:name="android.support.FILE_PROVIDER_PATHS"
        android:resource="@xml/provider_paths" />
</provider>
Pang
  • 8,605
  • 144
  • 77
  • 113
Prasanth Nath
  • 171
  • 1
  • 9
  • It does not help, it still crashes. (Of course, i have changed the `authorities` and i have created `provider_paths` xml file). – artuska Feb 03 '19 at 11:49