Best way to stopRanging and then startRanging another region ranging in Nougat

Hi ,
I have a use case where I have to switch beacon region from one to another for that I stopRegion and start. Below is the code for the same

// previous region
region = new Region("live region",UUID.fromString("B9407F30-F5F8-466E-AFF9-25556B57FE6D"), 61372, 40793);

// stopping previous region

//starting  newRegion ranging
 region = new Region("region",UUID.fromString("B9407F30-F5F8-466E-AFF9-25556B57FE6D"),13707, 31179); 
            if (region != null) {
                beaconManager.connect(new BeaconManager.ServiceReadyCallback() {
                    public void onServiceReady() {

The above code works well till Android 6.0 Marshmallow but not with Android 7.0 Nougat.
In Nougat it gives me empty beacons on OnDiscovered while on 6.0 and less it works well and give me beacons list always

beaconManager.setRangingListener(new BeaconManager.RangingListener() {
            public void onBeaconsDiscovered(Region region, List<Beacon> list) {


It starts ranging beacon and always return empty beacon list till I minimize the app and resume it
Once it is resumed it will find the beacons.

So my question here is that is there a better way to switch region so that it will work for Nougat also. Can you guys help me on this ?. Let me know if you need some more info on this.