Android Question how check intent.action.HEADSET_PLUG

i try filter intent in a Android8 and work:

Code: Copy
AddReceiverText(a2dp,
<intent-filter>
    <action android:name="android.bluetooth.headset.profile.action.CONNECTION_STATE_CHANGED" />
</intent-filter>
)

when arrive the ... "android.bluetooth.headset.profile.action.CONNECTION_STATE_CHANGED" ... I guess it's
STATUS=00 --> DISCONNECT
STATUS=02 --> CONNECT

but I do not know if it's the best way or there is some better method
 
Upvote 0
Back
Top