Android Question how check intent.action.HEADSET_PLUG

scsjc

Well-Known Member
Licensed User
Longtime User
i try filter intent in a Android8 and work:

B4X:
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
Top