Re: [android-developers] Re: How to tell if headphones are plugged in

2010-06-08 Thread Mark Murphy
info.sktechnol...@gmail.com wrote: > Ok, this worked. > > It would be useful to be able to get this information directly. ACTION_HEADSET_PLUG is a sticky broadcast. Call registerReceiver(null, new IntentFilter(ACTION_HEADSET_PLUG)) to get the last-broadcast Intent for that action, which will tell

[android-developers] Re: How to tell if headphones are plugged in

2010-06-08 Thread info.sktechnol...@gmail.com
Ok, this worked. It would be useful to be able to get this information directly. On Jun 8, 12:38 pm, sachin ravi wrote: > Try to register the broadcast event for ACTION_HEADSET_PLUG. > > in  intent.getIntExtra("state", 0)); you will get whether headset is > connected or not. > > On Tue, Jun 8, 2