Check CONNECTION_STATE_CHANGED in Android Q not works

Viewed 328

I use a broadcast receiver to check Bluetooth connection state changed. But not work in Android 10 and Google doesn't have information about this.

In other versions works fine but in Android Q not.

My configuration in AndroidManifest file:

<intent-filter>
       <action android:name="android.bluetooth.adapter.action.STATE_CHANGED" />
       <action android:name="android.bluetooth.adapter.action.CONNECTION_STATE_CHANGED" />
</intent-filter>

When I turn off Bluetooth manually the logcat print:

D/BluetoothAdapter: onBluetoothServiceDown: android.bluetooth.IBluetooth$Stub$Proxy@f426e8c

And when I turn on the logcat print:

D/BluetoothAdapter: onBluetoothServiceUp: android.bluetooth.IBluetooth$Stub$Proxy@f426e8c

Is a restriction from Android Q? Is possible to handler onBluetoothServiceUp or onBluetoothServiceDown? I need help please

Thanks

0 Answers
Related