Good day. I would like to know if the bluetooth scanning is unavailable now (locked by doze mode?).
Now i check it by this method:
fun isInDozeMode(context: Context) : Boolean {
val powerManager = context.getSystemService(Context.POWER_SERVICE) as PowerManager
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && powerManager.isDeviceIdleMode
}
But this method returns true even if i receive bluetooth (iBeacon) event just now.