Register for specific file type in Samsung File Browser on Android 8+-ThrowExceptions

Exception or error:

There’s been questions about registering your app for a specific file type in a way that is recognized by the Samsung File Browser too, but none of the solutions I found work on Samsung devices running Android 8 or later in a way that does not annoy users. As far as I can tell there are two problems here:

  1. for “exotic” file types, the system has no clue about the correct mime type for that file, therefore you can’t rely on mimeType for your Intent-Filter
  2. most apps don’t expose the real filename in the URI anymore, meaning the pathPattern-tag of an Intent-Filter is useless too

Is there a solution to register your app to open arbitrary file types (recognized by its file extension) that works for “all” apps (file explorer, email apps, etc), including the default Samsung file explorer?

How to solve:

Leave a Reply

Your email address will not be published. Required fields are marked *