freshworks / hotline-phonegap

Hotline Phonegap Plugin
https://hotline.io
Other
6 stars 11 forks source link

FileProvider for Hotline #30

Closed maxdimaz closed 7 years ago

maxdimaz commented 7 years ago

Hi today i got this message

"Missing/Bad FileProvider for Hotline. Camera capture will fail in devices running Nougat or later versions of OS (error code 354)"

How to fix that on phonegap project i was search and only found this one https://support.hotline.io/support/solutions/articles/221188-hotline-android-sdk-integration-steps

rsquare2014 commented 7 years ago

Hey,

As in Section no 1.1 in the link you shared you need to add

<provider android:name="android.support.v4.content.FileProvider" android:authorities="com.example.demoapp.provider" android:exported="false" android:grantUriPermissions="true"> <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/hotline_file_provider_paths" /> </provider>

In your AndroidManifest.xml file.

and in your Strings.xml file add <string name="hotline_file_provider_authority">com.example.demoapp.provider</string>

Don't forget to replace "com.example.demoapp." in the authorities attribute and in the strings file with your app's package name

maxdimaz commented 7 years ago

I was do it, here result of decompile my apk using apktool

AndroidManifest.xml (Some Tag) `

<uses-permission android:name="android.permission.RECORD_AUDIO"/>`

here is my string.xml `No matching FAQ categories found !

id.tested.android.provider
<string name="hotline_hint_compose_message">Type a message</string>`

still got that message anyother solutions?

maxdimaz commented 7 years ago

FIX :

add <provider> inside <application>