Xamarin Forms app with specific file-types

I researched and found materials that tell me how to handle an application with specific file types.

I'm trying now to open my application when clicking on my file in the manager. It's working on Android 4.4, for example, but version 7.0 did not work.

When I searched, I found this explanation, from official Android 7.0 Changes:

For apps targeting Android 7.0, the Android framework enforces the StrictMode API policy that prohibits exposing file:// URIs outside your app. If an intent containing a file URI leaves your app, the app fails with a FileUriExposedException exception.
To share files between applications, you should send a content:// URI and grant a temporary access permission on the URI. The easiest way to grant this permission is by using the FileProvider class. For more information on permissions and sharing files, see Sharing Files.

I understand that it only accepts mime type, and it is not possible to use specific types.

Is that correct? Can not we open a custom file anymore? If yes, what alternative can I adopt?

Thanks!

Sign In or Register to comment.