Re: [android-developers] Re: Capturing HEADSET_PLUG (android.intent.action.HEADSET_PLUG)

2010-02-03 Thread Porting beginner
On Thu, Apr 2, 2009 at 6:19 AM, Henning Schaefer wrote: > > Sure... you need to implement two classes. One, derived from > BroadcastReceiver, which actually captures the broadcast. And, of > course, the service that keeps the receiver alive all the time. The > service is the easy part. You only n

[android-developers] Re: Capturing HEADSET_PLUG (android.intent.action.HEADSET_PLUG)

2009-04-22 Thread Kenny
This code is good. But can I put it to AndroidManifest.xml? In case the receiver has not run, I think AndroidManifest.xml is the way to register the receiver class. Thanks, Kenny On Apr 2, 10:19 pm, Henning Schaefer wrote: > Sure... you need to implement two classes. One, derived from > Broadca

[android-developers] Re: Capturing HEADSET_PLUG (android.intent.action.HEADSET_PLUG)

2009-04-02 Thread Henning Schaefer
Sure... you need to implement two classes. One, derived from BroadcastReceiver, which actually captures the broadcast. And, of course, the service that keeps the receiver alive all the time. The service is the easy part. You only need to override two methods: @Override public void onCreat

[android-developers] Re: Capturing HEADSET_PLUG (android.intent.action.HEADSET_PLUG)

2009-03-26 Thread Gerby
hi henning do you have some example code for me, how to create a service to detect the headset, please? Cheers On 16 Feb., 17:21, zero wrote: > on a side note, i recommend the logcat app for such > momentshttp://code.google.com/p/android-random/ > > On Feb 16, 5:04 pm, Henning Schaefer > wro

[android-developers] Re: Capturing HEADSET_PLUG (android.intent.action.HEADSET_PLUG)

2009-02-16 Thread zero
on a side note, i recommend the logcat app for such moments http://code.google.com/p/android-random/ On Feb 16, 5:04 pm, Henning Schaefer wrote: > OK, after digging into the android system code, I think I figured out > what's wrong here... the class "HeadsetObserver" from the base system > actu

[android-developers] Re: Capturing HEADSET_PLUG (android.intent.action.HEADSET_PLUG)

2009-02-16 Thread Henning Schaefer
OK, after digging into the android system code, I think I figured out what's wrong here... the class "HeadsetObserver" from the base system actually sends out this intent with its FLAG_RECEIVER_REGISTERED_ONLY flag set... obviously, there's no way to receive this intent without implementing a serv