I am using radius networks iBeacon Api. I am scanning the beacons in background mode for every sec.I have two beacons. Some times Scanning the beacons are not consistent. How do I over come this issue?
Assume that there are two beacons
At first Interval Scan
Beacon 1,Beacon 2 Found
At Second Interval Scan
Only Beacon 1 or Beacon 2 coming
At third Interval Scan
Beacon 1 and Beacon2 Found
At fourth Interval
Again Single Beacon coming..
Like this I am getting
The most likely explanation is the beacon you are using is not transmitting frequently enough. For best performance, a beacon should send out an advertisement at least 10 times per second. An iOS device acting as an iBeacon sends out advertisements 30 times per second.
When ranging for beacons, the Android iBeacon Library sends updates by default every 1100ms with a list of each beacon discovered in this period. If no transmissions are detected in this interval for a particular beacon, that beacon will not be included in the list for that scan interval.
Changing your hardware is not necessary to address cases where beacons intermittently are not included in callbacks. Just maintain a list in software of beacons seen in the last five seconds or so.
Alternately, you may also simply lengthen the scan period, but this will reduce the frequency in which you gat callbacks: