Freshchat 用于响应本机错误文件提供程序错误

Oct*_*vio 7 react-native freshdesk

我正在使用以下链接中的说明将 Freshdesk 集成到 react native 中:

https://support.freshchat.com/support/solutions/articles/50000000467-freshchat-react-native-sdk-integration-steps

完成这些步骤后,我收到错误消息:

Missing/Bad FileProvider for Freshchat. Camera capture will fail in devices running Nougat or later versions of OS (error code 354)
Run Code Online (Sandbox Code Playgroud)

有任何想法吗?谢谢。

我正在使用本机 0.61.4

Muh*_*man 6

AndroidManifest.xml

尝试更改android:name="android.support.v4.content.FileProvider"android:name="androidx.core.content.FileProvider"

<application>

<provider
    android:name="androidx.core.content.FileProvider"
    android:authorities="com.mypackage.provider"
    android:exported="false"
    android:grantUriPermissions="true">
    <meta-data
        android:name="android.support.FILE_PROVIDER_PATHS"
        android:resource="@xml/freshchat_file_provider_paths" />
</provider>
</application>
Run Code Online (Sandbox Code Playgroud)

值/strings.xml

<string name="freshchat_file_provider_authority">com.mypackage.provider</string>
Run Code Online (Sandbox Code Playgroud)

参考号


小智 0

请参考这个解决方案,它将帮助您解决这个问题。

var freshchatConfig = new FreshchatConfig(APP_ID, APP_KEY); 
freshchatConfig.cameraCaptureEnabled = false;
Run Code Online (Sandbox Code Playgroud)

使用false而不是true.