Android - How to assign default app to unlisted file type
Although this is slightly programming related, nevertheless;
You can't assign an application to open a specific file extension (.notes
or .md
in this case) if the application has no explicit intent filter declared in manifest file to open that extension type.
When an app is created it usually has various intent categories and intent filters for particular file extension(s) that makes android to recognise the capability to open a file extension.
If the declared intent filter matches that of a particular file say .pdf then android populates and lists all available applications capable of handling that file type, otherwise if no application contains thie specific intents to open/browse etc the particular file extension (.md
or .notes
in this case) then there is no way to set a default application for that file extension or at least to open that extension.
To expand on this lets consider an intent filter for a cetain application capable of opening/handling audio files:
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="content"/>
<data android:scheme="file"/>
<data android:mimeType="application/x-flac"/>
<data android:mimeType="audio/*"/>
<data android:mimeType="application/ogg"/>
<data android:mimeType="application/x-ogg"/>
<data android:mimeType="application/itunes"/>
</intent-filter>
In the named intents categories this audio application will have the capability to handle files extensions of audio types including .ogg and itunes file types.
Unless the intents to browse or open these file extensions have been declared in the manifest files of your already installed applications, you can't assign any application to be default. Either you first have to install an app capable of handling such extension or create your own application using suitable filters.
Related: Android intent filter for a particular file extension?