I am building a keyboard app in which I added a microphone key to record the audio through MediaRecorder. Now inorder to send text messages from my keyboard app, I used function