Since in this case I wanted to open a Ruby file, this would need at least the MIME type text/x-ruby but I guess adding something like <data android:mimeType="text/*" /> would solve this generically for all text file.
If VHEditor should be suggested for any file type, you could probably also simply use <data android:mimeType="*/*" /> in the manifest and then you could even still match for file extensions with something like <data android:pathPattern=".*\\.rb" /> (I don't think that matching a file extension would be necessary though).
And for opening directories, you probably would have to use the DocumentsContract.Document.MIME_TYPE_DIR (vnd.android.document/directory and for compatibility reasons maybe also inode/directory).
PS: Thank you so much for VHEditor. So far it looks great!
PPS: I'm not an Android developer so I don't know whether any of what I wrote makes any sense 😉
I wanted to open a Ruby file but VHEditor isn't in the list of applications (I also tried to open a directory but this didn't work neither):
So you probably would have to add text files and source code files as association to the
AndroidManifest.xml
.Since in this case I wanted to open a Ruby file, this would need at least the MIME type
text/x-ruby
but I guess adding something like<data android:mimeType="text/*" />
would solve this generically for all text file.If VHEditor should be suggested for any file type, you could probably also simply use
<data android:mimeType="*/*" />
in the manifest and then you could even still match for file extensions with something like<data android:pathPattern=".*\\.rb" />
(I don't think that matching a file extension would be necessary though).And for opening directories, you probably would have to use the
DocumentsContract.Document.MIME_TYPE_DIR
(vnd.android.document/directory
and for compatibility reasons maybe alsoinode/directory
).PS: Thank you so much for VHEditor. So far it looks great! PPS: I'm not an Android developer so I don't know whether any of what I wrote makes any sense 😉