WAI
Status Update
Comments
vs...@google.com <vs...@google.com> #2
Update: The system doesn't broadcast the intent BluetoothDevice.ACTION_PAIRING_REQUEST.
I tried to intercept the ACTION_PAIRING_REQUEST broadcast to input the PIN manually with BluetoothDevice.setPin(int), but whereas in Kitkat this (or the normal bonding) works correctly, in Android 5.0 this broadcast is not received by my app.
I tried to intercept the ACTION_PAIRING_REQUEST broadcast to input the PIN manually with BluetoothDevice.setPin(int), but whereas in Kitkat this (or the normal bonding) works correctly, in Android 5.0 this broadcast is not received by my app.
tn...@google.com <tn...@google.com> #3
Extra info:
The BLE chip of my device is a TI CC2540.
The pairing variant is BluetoothDevice.PAIRING_VARIANT_PIN
I attach an app that sets broadcasts receivers to show how in Android 5.0 there's no ACTION_PAIRING_REQUEST broadcast and the bond state passes directly from BONDING to BONDED. The screenshot shows the difference with KitKat when pairing the same device.
The BLE chip of my device is a TI CC2540.
The pairing variant is BluetoothDevice.PAIRING_VARIANT_PIN
I attach an app that sets broadcasts receivers to show how in Android 5.0 there's no ACTION_PAIRING_REQUEST broadcast and the bond state passes directly from BONDING to BONDED. The screenshot shows the difference with KitKat when pairing the same device.
nc...@gmail.com <nc...@gmail.com> #5
[Comment deleted]
en...@google.com <en...@google.com>
co...@gmail.com <co...@gmail.com> #6
I have same problem, please send me your "ble_bond_test.apk" source code. Thanks very much!
Description
Since it was unhidden in API level 19, try-with-resources is backwards compatible down to API level 15.
I have a reasonably successful app with around 600k users on APIs between 15 and 18, in which I use try-with-resources heavily, and never had a single issue with it.
My gradle configuration is as attached. However, Android Studio complains that try-with-resources requires API level 19, as you can see from the attachment.
Would you consider change this when minSdkVersion is 15 or greater, and targetSdkVersion is 19 or greater? It would make try-with-resources useable by a lot more projects.