Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beacons stopMonitoring doesn't stop monitoring the specified region #18

Open
lchinke opened this issue Aug 17, 2018 · 1 comment
Open

Comments

@lchinke
Copy link

lchinke commented Aug 17, 2018

Hi,

i am trying to stop monitoring a beacon region but its not working. The message i receive is the following:
beacons: invoke beacons->stopMonitoring {"identifier":"b65de587b6494010af5bb6a733fc8ddd","ids":["b65de587-b649-4010-af5b-b6a733fc8ddd"],"bluetoothAddress":null}I/flutter (13139): beacons: finished without data

@lchinke
Copy link
Author

lchinke commented Aug 17, 2018

To solve this error, in BeaconClient.kt change stopMonitoring() method to:

fun stopMonitoring(region: RegionModel) {
    region.initFrameworkValue()
    sharedMonitor!!.stop(region)
    beaconManager!!.stopMonitoringBeaconsInRegion(region.frameworkValue);
    //        val toRemove = requests.filter { it.kind == Operation.Kind.Monitoring && it.region.identifier == region.identifier }
    //        if (toRemove.isEmpty()) return
    //        toRemove.forEach { stopRequest(it) }
    //        requests.removeAll(toRemove)
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant