While integrating FreshChat in an Flutter application I followed each steps in the Freshdesk Messaging Flutter SDK integration steps : Freshdesk Messaging (freshchat.com)
After calling Freshchat.init
function it showed an toast with an error saying
Missing/Bad FileProvider for Freshchat. Camera capture will fail in devices running Nougat or later versions of OS (error code 354)
Below is the configuration changes I made in Android
android\app\src\main\AndroidManifest.xml
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="in.package.name"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/freshchat_file_provider_paths" />
</provider>
android\app\src\main\res\values\strings.xml
<string name="freshchat_file_provider_authority">in.package.name</string>