I have tried to reproduce the symptoms you describe, but have been unable to do so on a Nexus 5 with Android 5 and a transmitting RadBeacon USB.
Reference application modifications:
Added these lines to the BeaconReferenceApplication onCreate() method:
beaconManager.setBackgroundBetweenScanPeriod(1000l);
beaconManager.setBackgroundBetweenScanPeriod(31000l);
beaconManager.setAndroidLScanningDisabled(true);
BeaconManager.setDebug(true);
The third line above is needed because I was testing on a Nexus 5 with Android 5 and I wanted to exercise the 4.x scanning APIs,
like you would be done on a 4.4 phone.
Added this line to the RangingActivity didRangeBeaconsInRegion callback:
Log.d(TAG, "ranged beacon: "+firstBeacon.toString());
Testing steps:
Enable a RadBeacon USB transmitting at 10 HZ.
Log the results with:
$ /Users/dyoung/sdk-android-studio/platform-tools/adb logcat -v time | grep "anged beacon"
Run the reference app, started ranging in the foreground, and after three seconds put it into the background. See the following logging results:
03-01 08:39:00.146 D/RangingActivity(11146): ranged beacon: id1: 04ff791e-f83b-434b-8031-1b3e72bdbcb7 id2: 1 id3: 1
03-01 08:39:01.282 D/RangingActivity(11146): ranged beacon: id1: 04ff791e-f83b-434b-8031-1b3e72bdbcb7 id2: 1 id3: 1
03-01 08:39:02.482 D/RangingActivity(11146): ranged beacon: id1: 04ff791e-f83b-434b-8031-1b3e72bdbcb7 id2: 1 id3: 1
03-01 08:39:03.515 D/RangingActivity(11146): ranged beacon: id1: 04ff791e-f83b-434b-8031-1b3e72bdbcb7 id2: 1 id3: 1
03-01 08:39:12.148 D/RangingActivity(11146): ranged beacon: id1: 04ff791e-f83b-434b-8031-1b3e72bdbcb7 id2: 1 id3: 1
03-01 08:39:44.274 D/RangingActivity(11146): ranged beacon: id1: 04ff791e-f83b-434b-8031-1b3e72bdbcb7 id2: 1 id3: 1
03-01 08:40:16.179 D/RangingActivity(11146): ranged beacon: id1: 04ff791e-f83b-434b-8031-1b3e72bdbcb7 id2: 1 id3: 1
03-01 08:40:48.239 D/RangingActivity(11146): ranged beacon: id1: 04ff791e-f83b-434b-8031-1b3e72bdbcb7 id2: 1 id3: 1
03-01 08:41:20.272 D/RangingActivity(11146): ranged beacon: id1: 04ff791e-f83b-434b-8031-1b3e72bdbcb7 id2: 1 id3: 1
03-01 08:41:52.205 D/RangingActivity(11146): ranged beacon: id1: 04ff791e-f83b-434b-8031-1b3e72bdbcb7 id2: 1 id3: 1
03-01 08:42:24.202 D/RangingActivity(11146): ranged beacon: id1: 04ff791e-f83b-434b-8031-1b3e72bdbcb7 id2: 1 id3: 1
As you can see, the callbacks come every 1.1 seconds in the foreground, and every 32 seconds in the background. This is as expected.
If you cannot repeat the above steps using the reference application on the OnePlus device with Cyanogenmod 4.4, then the issue may be with the ROM for that device. If you can confirm this
and capture a full Logcat output for the period where the callbacks don't come (with debug turned on as described above), then please open an issue at http://github.com/AltBeacon/android-beacon-library/issues and attach a copy of the log capture.