FileProvider を他のアプリケーションで利用できるようにすることは可能ですか?
マニフェスト.xml
...
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="com.example.myapp.fileprovider"
android:exported="true"
android:grantUriPermissions="false"
android:permission="com.example.filesvisible.permission.READ" >
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/filespath" />
</provider>
...
ドキュメントから:
false: プロバイダは他のアプリケーションで使用できません。android:exported="false" を設定して、プロバイダーへのアクセスをアプリケーションに制限します。プロバイダーと同じユーザー ID (UID) を持つアプリケーションのみがアクセスできます。
exportを true に設定しようとしましたが、この例外が発生しました
Unable to get provider android.support.v4.content.FileProvider: java.lang.SecurityException: Provider must not be exported
Why I can't export a FileProvider ?