Opening files (with unknown content type) from My Files

I need some help with integrating with Samsung My Files.

When My Files tries opening a file whose mime type it doesn’t recognize, it defaults to passing an empty string, which is impossible to set an intent filter for – setting an empty mime type in an intent filter is not valid. This means the only way to catch it is by using /, which results in a bad outcome for users because it catches all files, even definitely unrelated ones.

For unknown file types, My Files should default to application/octet-stream (per http://www.rfc-editor.org/rfc/rfc2046.txt).

The deeper problem here is that content//: URIs do not provide file extensions, so then target applications are unable to filter on the basis of file extension either.

(Note I tried reporting this to Samsung directly but the bug report form returns 502 Gateway Error)

This report contains a rewrite of information we found on Stack Overflow: Unknown file type MIME? - Stack Overflow and on our experience in Keyman: [Android] KMP not installing with Samsung "My Files" browser · Issue #629 · keymanapp/keyman · GitHub, bug(android): attempting to open a package from Files results in an error 'You don't have any apps that can open this type of file' · Issue #10133 · keymanapp/keyman · GitHub.

Hello marc,

I believe the Samsung Members application will be a good way to report the issue and provide feedback to Samsung directly. You can also retry submitting the bug report and check if the 502 Gateway Error still occurs or not. The error does not seem to be intended. Good luck.