It's sticky, so:
Intent headsetIntent = registerReceiver(
null,
new
IntentFilter( Intent.ACTION_HEADSET_PLUG ),
null, null
);
Pent
On Sep 27, 7:14 pm, "E." <[email protected]> wrote:
> Using Intent.ACTION_HEADSET_PLUG, my app can be notified when a wired
> headset is plugged or unplugged.
>
> But how can it determine whether or not it's plugged in when it starts
> running?
>
> The closest thing I can find is AudioManager.isWiredHeadsetOn() which
> "checks whether audio routing to the wired headset is on or off" - but
> the headset can still be connected without audio being routed to it.
--
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