我想从我的应用程序共享文件到其他应用程序,例如whats app,gmail等,但出现异常无法处理方法调用
我尝试使用Share,easy_share和flutter_share共享文件,但是我也面临相同的问题。找不到授权为com.anand.mybain.fileprovider的提供商的元数据
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.provider"
android:exported="false"
tools:replace="android:authorities"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/filepaths"
tools:replace="android:resource"
/>
</provider>
filepaths directory is res/xml/ filepaths and filepaths.xml is
<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
<!-- <external-path name="external_files" path="/storage/emulated/0/Android/data/com.anand.mybain/files/Pictures/"/>-->
<!-- <files-path path="Android/data/com.anand.mybain/files/Pictures/" name="myimages" />-->
<external-path name="external_files" path="."/>
</paths>