Android Headset - Full Example
When working on my Thesis for my Masters I ended up needing to use the headset of the Nexus One and from that project I uploaded a couple of code snippets. Within the comments someone asked for a full example of working code and I said I would put one together.
A little late I admit, but I have finally found the time to put it together, I had a little issue with the priority of the intent filter, but I have put a fix within the source code, although it is extremely hacky and I’m not particularly happy it being there.
You can grab the source code from my github account: https://github.com/gauntface/Android-Headset-Example
I tested this code on a Nexus One (2.2.2) and G1 (1.6), this is no guarantee with this code and there is a fair bit you could do to tidy up the registering and un-registering of the broadcast receivers.
Any questions, post em in the comments :)
Orig Photo: https://flic.kr/p/fDcSLc
Found an issue?
All my posts are available to edit on GitHub, any fix is greatly appreciated!
