Skip to content

when the user puts the app to background and then foreground more than 5 times within 30 seconds, app gets "scanning too frequently error" #1199

@elican-doenyas

Description

@elican-doenyas

Expected behavior

The library should check the scan start's, to prevent the OS from limiting the app with the error:
"App 'com.xx.yy' is scanning too frequently"
This causes the OS to block mentioned app from getting ble scan results for a brief period of time.

Actual behavior

The library does not check the scan start's when app is backgrounded and then foregrounded. Hence, this causes the OS to block the app from getting scan results due to exceeding the 5 start/stop limit within 30 seconds enforced by the OS.

Steps to reproduce this behavior

1- Put the app to background then after 1 second, back to foreground. Repeat 6-7 times
2- Observe the "App 'com.xx.yy' is scanning too frequently" error log
3- Observe to ble scan results do not get delivered to the app

Mobile device model and OS version

Samsung S23(SM-S911B) - Android 14 / API 34

Android Beacon Library version

implementation 'org.altbeacon:android-beacon-library:2.20.3'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions