Yes this is possible.
First read here : http://developer.android.com/reference/android/content/Intent.html#ACTION_HEADSET_PLUG
code samples are here : http://www.gauntface.co.uk/blog/2010/04/14/using-android-headset-buttons-earphone-buttons/
Hope this help,
Fred
--
-- On 16 December 2012 22:50, Mark Murphy <mmurphy@commonsware.com> wrote:
I would assume that AudioRecord would handle that scenario, though I
have not tried it:
http://developer.android.com/reference/android/media/AudioRecord.html
--
On Sun, Dec 16, 2012 at 5:40 PM, Caio Ricci <caiaoricci@gmail.com> wrote:
> I've done a lot of research on this, but I still don't understand it
> completely. I want to use the audio jack to detect if this pedal, ( or any
> other of these on off pedals) is pressed or not. I tried it on my Linux
> machine and simply reading the sound card file I was able to see some input.
> But I don't know how to do that on the device. I assume that it's possible
> because i see things like the square reader(https://squareup.com/reader) and
> what i'm aiming for is much simpler than that.
>
> I just don't know how to begin. Any suggestions?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy
Här kan du ställa och svara på frågor om applikationsutveckling på
Android: http://www.andglobe.com
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
Sent from an Ubuntu Desktop.
Ubuntu Speech input is now available on Google Play, along with Magnetic Door Alarm app.
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
No comments:
Post a Comment