Hi to all! I updated my sdk and set the target version on 28, but in Android 8 i have an intent that is not acquired. I need to know when a bluetooth device is connected or disconnetted with my device.
I used ACTION_CONNECTION_STATE_CHANGED o bluetooth adapter and works in others android versions.
This is the manifest:
In SendNotification service i write a log with the action, but CONNECTION_STATE_CHANGE will never called
STATE_CHANGED works correctly
Any advice? Thanks!
I used ACTION_CONNECTION_STATE_CHANGED o bluetooth adapter and works in others android versions.
This is the manifest:
B4X:
AddReceiverText(SendNotification,
<intent-filter>
<action android:name="android.bluetooth.adapter.action.STATE_CHANGED"/>
<action android:name="android.bluetooth.adapter.action.CONNECTION_STATE_CHANGED"/>
</intent-filter>)
AddPermission(android.permission.BLUETOOTH)
AddPermission(android.permission.BLUETOOTH_ADMIN)
In SendNotification service i write a log with the action, but CONNECTION_STATE_CHANGE will never called
B4X:
Service_Start (StartingIntent As Intent)
Log(StartingIntent.Action)
Any advice? Thanks!