Android Mode Midi - Tutorial request

I’m looking for a way to send CC and Sysex-data to an external hardware synth. I’d like to make a soundeditor-app, and I think this could be possible with Processing for android, but I don’t know how to set it up. I’d need to know how to implement MidiManager and Input/Output ports from android.media.midi.
Maybe a simple example how to send a Note-on event to a external hardware-synth would be enough to get started.

Thanks.