I am writing an Android app that reads external hardware via microphone input. My problem is that sometimes the phone thinks that the incoming sign through Mai is pressing the "play" button and the music starts playing (the play button shorts microphone on the ground and some of the signals I'm reading are quite close )
I have seen applications which block the play button from a headset. I wonder how can I add this functionality to my own app? Just an estimate: Set up a broadcast ACTION_MEDIA_BUTTON for the intent of the receiver and handle it so that it's music. App does not pass on.
Comments
Post a Comment