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, 2010 at 9:56 PM, [email protected] <
[email protected]> wrote:
> I need to know whether headphones are plugged in and receiving
> my audio stream. I have tried using isWiredHeadsetOn from the
> AudioManager, but this seems to always return false, even when
> I am hearing audio through the headphones. I have only tried this
> on my EVO.
>
> 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 [email protected]
> To unsubscribe from this group, send email to
> [email protected]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en