4

in Android 6.0 Marshmallow, is it possible to assign a default app to a file type that isn't listed yet? Specifically, I have *.notes for plain text notes, and *.md files for markdown. Windows is set to open them with my editor.

Is this possible in Android? So far, I can only assign default apps to file types that are already listed. Not to ones that aren't yet. From here etc., I find several different apps all called 'default app manager'. None of them seem to offer what I want.

Any suggestions?

  • It turns out that editing any single text file in both Windows and Android (or *nix) is not a good idea, because of the different end-of-line characters. Use a web-based editor if you want to edit text on all platforms (I don't know a good one. Yet). – RolfBly Aug 4 '17 at 19:15
3

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?

0

I agree a little change in the manifest file or file activity would do the required action. For eg you can copy RAR's intent activity to drastic D's emulator's manifest file and make it support zip or 7z files (even on Android 6.0,7.0&8.0+) . To do this changing on Android you can use APK Editor Pro which would suit the purpose. Ps- APK ed Pro is an easy to use APK just google APK Editor Pro full APK free download. And you'll get it.(it works best on rooted devices yet works decently on non-rooted devices). ~Arie

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.