I need to use 2 file providers for my app.
I have tried the quick fix suggested in this answer:
https://stackoverflow.com/a/42989182/7952427
But the app crashes.
I know that the second provider is causing this exception/crash because when i remove it, the app doesn't crash anymore.
In Manifest:
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="com.example.android.fileproviderTestLyb"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths">
</meta-data>
</provider>
<provider
android:name=".MyFileProvider"
android:authorities="com.example.android.fileprovider2"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS_video"
android:resource="@xml/video_path">
</meta-data>
</provider>
The File Provider class:
import android.support.v4.content.FileProvider;
public class MyFileProvider extends FileProvider{
}
Can anyone help me understand why? Do i need to add something to MyFileProvider class?
FileProviderhas nothing to do with windows.