Is possible to Use the 3.5mm JACK

by Thibaud Ringenbach » Tue, 12 Apr 2011 07:23:44 GMT

Sponsored Links
 Hello All,

being a french developer, i need in my app to have 3 external buttons
of the phone. It could be buttons of an headset pluged on the 3.5mm
JACK. is that possible to intercept the play/next/prev buttons in
order to launch functions in my app??

Hope i can.

Thanks a lot !!


Re: Is possible to Use the 3.5mm JACK

by Mark Murphy » Tue, 12 Apr 2011 09:58:01 GMT

 On Mon, Apr 11, 2011 at 8:43 AM, Thibaud Ringenbach

There are KeyEvents for various button presses that a running activity
can listen for via onKeyDown().

Mark Murphy (a Commons Guy)  |  | 

_The Busy Coder's Guide to *Advanced* Android Development_ Version
1.9.2 Available!


Sponsored Links

Re: Is possible to Use the 3.5mm JACK

by Thibaud Ringenbach » Tue, 12 Apr 2011 16:12:57 GMT

 Yes Thank you, I think i see what do you mean, i'll try to find a


Other Threads

1. What does "Battery Use" tell and how is it implemented?

Hey all, I have some questions about what "Settings -> About Phone ->
Battery Use" tell us and how it is implemented. Most of my questions
have been answered here,
But I could not find answers of (7), (8), (9) and the difference
between "Android System" and "Android Core Apps"/"Android OS". I'm
wondering if anybody on this mailing list could help me. Thanks in

Here are the questions:

(7) How does Android measure energy used by individual hardware
component? For example, to measure energy used by display, does it
measure by voltage and current or just measure by the time the display
and/or backlight is turned on? If the latter is the case, how does it
handle different hardware?

(8) How does Android measure energy used by CPU/RAM/Flash of each
individual process? I guess for CPU, it may use exampling and find how
long each process occupies the CPU, just like many performance
profilers do. But for RAM and Flash, it seems to be very expensive to
measure it on-line.

(9) Is information in "Batter Use" accurate? :-)



2. Geofence application in android

How would I go about doing a geofence characteristic in my android
app? I dont want to be pooling the GPS hardware for location, and then
making some calculations to see if the current lat/lng location is
inside ( or not ) a delimited area. On iPhone ( dont know if I can
mention iphone here ;)) I can use some system API to notify me upon
entering/leaving a certain region that I had pre-determined in my
app... Is there anything that relates to that? How does android apps
do it? ;)

Thanks in advance,
Victor Lima


3. framework to integrate a new voice recognition engine.

4. Android Email Client Omits Email Headers

5. Problems porting Android OS onto a new platform

6. How to embed an external Activity inside one of mine?

7. Appearance updated application as "Just in" - wait 12-14 days between updates?