class HighPriorityHandler
This class manages the compatbility with "High Priority". High Priority is a mode of Android where you can call mBluetoothGatt?.requestConnectionPriority(CONNECTION_PRIORITY_HIGH). On some devices this leads to loss of connection, on others it improves the performance roughly 50%.
This class manages a manual and automatic list of High Priority devices. Currently we always try High prio unless a device is blacklisted. For whitelisted devices we will always try high priority and assume if a connection loss occurres due to status=34 that it is a different problem.
<init> |
This class manages the compatbility with "High Priority". High Priority is a mode of Android where you can call mBluetoothGatt?.requestConnectionPriority(CONNECTION_PRIORITY_HIGH). On some devices this leads to loss of connection, on others it improves the performance roughly 50%. HighPriorityHandler(context: Context) |
canChangeHighPriorityMode |
fun canChangeHighPriorityMode(): Boolean |
isHighPriorityDisabledAutomatically |
Returns true if High Priority was disabled due to automatic detection. fun isHighPriorityDisabledAutomatically(): Boolean |
markHighPriorityNotSupported |
Marks current device as not supported for high priority. fun markHighPriorityNotSupported(): Unit |
markHighPriorityNotSupportedDueToConnectErrors |
Marks current device as not supported for high priority and tracks that it had connect errors. fun markHighPriorityNotSupportedDueToConnectErrors(): Unit |
reenableHighPriority |
Reenables high priority mode. fun reenableHighPriority(): Unit |
shouldSupportHighPriority |
fun shouldSupportHighPriority(): Boolean |
HIGH_PRIORITY_AUTO_KEY |
const val HIGH_PRIORITY_AUTO_KEY: String |
HIGH_PRIORITY_KEY |
const val HIGH_PRIORITY_KEY: String |