Basic implementation. Not tested, no sample app.

No time to get sample app yet. Not sure if codes work eh.