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

Monitoring for multiple regions(uuids) #166

Open
FranciZ opened this issue Jul 21, 2015 · 3 comments
Open

Monitoring for multiple regions(uuids) #166

FranciZ opened this issue Jul 21, 2015 · 3 comments

Comments

@FranciZ
Copy link

FranciZ commented Jul 21, 2015

After some research I realise that iOS can monitor for up to 20 regions(uuids) at a time and that Android has no such restriction. Is it possible using this plugin to define an array of regions(uuids) and monitor for change in state for each region?

Below is the closest to what I think should work but the delegate only returns change in state for one of the regions.

var delegate = new cordova.plugins.locationManager.Delegate();
cordova.plugins.locationManager.requestAlwaysAuthorization();

delegate.didDetermineStateForRegion = function(pluginResult){
        console.log(JSON.stringify(pluginResult));
}

cordova.plugins.locationManager.setDelegate(delegate);

var beaconRegion1 = new cordova.plugins.locationManager.BeaconRegion(identifier, uuid2);
var beaconRegion2 = new cordova.plugins.locationManager.BeaconRegion(identifier, uuid3);

cordova.plugins.locationManager.startMonitoringForRegion(beaconRegion1)
                .fail(console.error)
                .done();

cordova.plugins.locationManager.startMonitoringForRegion(beaconRegion2)
                .fail(console.error)
                .done();
@0x1ad2
Copy link

0x1ad2 commented Jan 15, 2016

I'm also experiencing this. On Android everything works like a charm setup 3 regions all get monitored but on iOS it will only monitor the first region.

@0x1ad2
Copy link

0x1ad2 commented Jan 20, 2016

Is there a fix available anywhere? We've tried to contact @petermetz but without any result, is someone willing and able to fix this? We even could arrange a pay, we need it asap.

@pure4Sk
Copy link

pure4Sk commented May 13, 2016

Is it fixed?

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

3 participants