iBeacon detection not consistent - ios

When I'm testing my iBeacon enabled iOS application for different scenarios with iOS 9, I've found that it doesn't discover the iBeacon for a quite a while after I toggle on Bluetooth.
Scenario is as follows,
I kill my application, turn Bluetooth off and then lock the phone. Then I wake the phone via power button and in the lock screen I turn on Bluetooth via the Control Center and wait till the iBeacon monitoring starts.
In the device log I've noticed that the iBeacon monitoring and app ranging has not started even after several attempts.
This scenario fails more often than not in an iPhone 5 which is updated to iOS 9.0.2 and recently I've noticed that this is there in iOS 8.4 device as well.
Any sort of help would be appreciated.
Thanks.

Related

Why is Iphone constantly transmitting a single beacon when it's bluetooth is enabled and it's screen is unlocked?

I've a iOS 10 device in my work place and I got curious about it's bluetooth's weird behaviour. So.. I was playing around with my Android's Beacon simulator App and I noticed that every time I unlocked my IPhone and enabled the Bluetooth a new entry was immediately created in my android's near by beacon's list. Is there a reason for that?
UPDATE 1
- handoff disabled
- AirDrop disabled
- No open apps.
= still got a mysterious broadcast on my Beacon Simulator App.
UPDATE 2
Ok, I was digging into the subject and noticed that the iOS device is not being able to find near by devices in a standard bluetooth discovery.
In the other hand, near-by devices can detected the iPhone and when clicking on his entry in their result's list a popup for pairing shows up on Iphone's screen and as if it was magic the name of the device trying to pair shows up on the iphone's list that is always empty, in this case Huawei P9 but tested with a note 4.
I am the developer of Beacon Simulator. I just want to warn that the app is a Beacon simulator before all, not really a Beacon scanner. I added the scanning part because it was easier to do some tests, for the beacon copy feature and also for future developments.
What the scanner will show you is not necessarily a beacon, but any scannable Bluetooth Low Energy devices, connectable or not. Unfortunately, it is difficult to know if a device is connectable or not with the Android API, so the app lists everything.
Since the icon represents a standard Bluetooth logo, it means it is a signal not recognized by the app (here, it isn't an iBeacon nor AltBeacon nor Eddystone beacon). So either it is a non standard beacon, or simply a signal to advertise a possible connection to the device. When a connectable device broadcast its presence, the signal uses the same channel and protocol than the one used by beacons. A connectable device will advert itself as connectable, but as said, the Android API erase this difference, unfortunately.
So what you see is not necessarily a beacon, but maybe simply your iPhone broadcasting its presence as a connectable device. Maybe I should add some disclaimers in the app.

How does Knock to unlock reliably detect knocks even on sleeping phones when in the background?

Here is the app: http://www.knocktounlock.com/
Which leads me to believe the prior threads on this topic(CoreMotion updates in background state) are no longer accurate because it does indeed work reliably even when your phone is in sleep mode and locked.
Based on their webpage, this is how it works. There is an app on the Mac. When you wake up the Mac screen, before unlocking, the Map app sends a BLE notification to the unlock app on the phone. BLE notifications can start iphone apps in the background. The iPhone app starts monitoring the accelerometer and send a BLE notification back to the Mac when you knock.

iBeacon transmission when app is closed?

We would like to use some configuration of the iBeacon , where the user's iPhone will advertise its services, but when the app is closed.
So when a user come across a hardware beacon, it will recognise the user's iPhone(as a beacon) without opening the app, and even connect to it .
I could find here many opinions about that, but i wonder if there are any news with the iOS8 ,and if there is a clear answer for that from Apple ?
A couple of points:
Bluetooth beacons, iBeacons included, are transmit only. They don't see or "recognize" other beacons or phones. The statement "when a user come across a hardware beacon, it will recognise the user's iPhone(as a beacon)" is not possible with the technology regardless of whether the app on the phone is in the foreground or the background.
iBeacons are supported on iOS devices with version 7.x and 8.x of the operating system. On all these versions, however, beacon transmission from the iOS device is only supported when the app is in the foreground. See here for details.

iOS - iBeacon - Advertise (Broadcast) as beacon in Background after iOS 7.1 update

I am trying to make an Application using iBeacon in which One device will work as beacon Broadcaster and another one as Receiver.I gone through the similar thing in Run iPhone as an iBeacon in the background but the solution that present there is not for API of iBeacon so i am asking this thing again.
I succeed in being notified on Detector Device(receiver) even the App is in Background or in Quit mode. but Whenever Broadcaster Device's App goes in Background it stops Broadcasting packets and become no more as beacon. When it comes back in Foreground it again works fine. So the issue is Broadcaster has to be always in Foreground to Act as Advertiser or Broadcaster.
Is there anyway to advertise/Broadcast packets of iBeacon's even when App is in background mode.
I have enabled capabilities "Location Update" and "Acts as a Bluetooth LE accessory" from xCode.
Unfortunately, it is simply not possible to advertise as an iBeacon in the background on iOS. For an explanation as to why, see here: Can we start iBeacon transmitter in background?
Apple doesn't authorize it, it would be a mean to track an user which is quite against Apple current policy to preserve users' privacy.
The capabilities "Acts as a Bluetooth LE accessory" is to enable your application to continue being used as a bluetooth device (with a connection) when the app go in background mode. Advertising isn't a connected usage of bluetooth and isn't concerned by this capabilities.

Is it possible for an iOS device to broadcast as an iBeacon and monitor for iBeacons at the same time?

Is it possible for an iOS device to broadcast as an iBeacon and monitor for iBeacons at the same time? I'm currently doing this with a custom raspberry pi solution and want to know if it could translate to the device.
Yes, you can do this if the app is in the foreground (transmission always requires the app to be in the foreground.) You can see a demo of this by using my Locate app in the AppStore.
An important thing to realize is that the device will not pick up its own transmission in a scan.

Resources