I need to make an App able to open a specific file extension related to a custom file format, so that when I click on a file that has such extension It's shown the dialog with my App as one of the App that can open such file.
In past versions of Android I have achieved this adding the following Intent Filter in the manifest in the section of the MainActivity
<intent-filter android:icon="your_drawable-resource"
android:label="your_string_resource"
android:priority="integer">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="file" />
<data android:host="*" />
<data android:pathPattern=".*\\.MY_CUSTOM_FILE_EXTENSION" />
</intent-filter>
That is analogous to the answer found in an old similar question.
Recently I have tried to do the same but this doesn't work anymore and my app doesn't appear registered as able to open that extension.
What is the proper way to register the App for a file extension now?
EDIT It's not a duplicate since I have clearly stated that method used previously by myself and in others similar questions doesn't work anymore and It has nothing to do with email attachment since It's related to an App that must be registered for Its own file format, not a common file format.