[Android] associate with MID-files
Brought to you by:
madhav_vaidy
Currently opening a midi-file doesn't emerge MidiSheetMusic as an app to open with.
This is important when opening with a cloud app, e.g. Google Drive. A file is not in FS -> MidiSheetMusic can't find it. No association -> Google Drive can't give the file to MidiSheetMusic.
Volunteers to fix?
Anonymous
Created a new activity OpenMidiStreamActivity and added it to the Manifest for the mime type "audio/midi":
..
<activity android:name="com.midisheetmusic.OpenMidiStreamActivity" android:label="Midi Sheet Music">
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="audio/midi"/>
</intent-filter>
</activity>
..
Attached is the class OpenMidiStreamActivity which basically useses a content resolver to get the content of the data (uri) given in the intent. On success the SheetMusicActivity is started with the given content.
A patched version was published and will be available in a few hours in the Google Play store: https://play.google.com/store/apps/details?id=com.midisheetmusic.patched
As a test an attached "xxx.mid" file from the e-Mail client could be opened directly.
Ferenc, thank you very much, that's so great!
Attached is the complete patch (containing features 14, 16 and 18).
Opening midi files from Internet URLs (HTTP) is not possible, because this would need to add the Internet-Access right to the manifest.