android 4.4.2,calling BPMManager.mBluetoothGatt.requestConnectionPriority(1) cause collapse,why?
Hi,
According to this: developer.android.com/.../BluetoothGatt.html the BluetoothGatt#requestConnectionPriority(int) method has been added in API 21, which is Android 5.0. This method does not exist on previous versions of Android.
You can wrap your code with something like that:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
// here you can safely call this method
}
Best Regards, Aleksander