This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Wake up Android (when off) with iBeacon Advertisement?

Hi,

I have the nrf52 working perfectly in iBeacon mode. Even when my iPhone is Off, the iPhone will wake up and post a notification with UUID, Major,Minor etc.. It's great.

So now I need to work on Android. So far I can see the Android get the iBeacon advertisement when in foreground, and when my app is closed I also get a single notification of the detection.

However, I cannot seem to get this event when my Android when off (screen blank). Can I do this? I can easily do this with an Iphone when it gets an iBeacon advertisement

If not with iBeacon format, can I do this if I format a second advertisement and send it EddyStone format?

I just need the Android to wake up and set an event (and vibrate) even when off (like the iPhone can)

... b.t.w If I do require EddyStone for this, it there a posting about sending out both types of formats in alternating intervals?

Thanks to all .. J!

  • Hi,

    On Android you may scan, and do pretty whatever you want, no matter whether the screen is on or off. It is a good practice to keep in mind the battery usage etc, but if you want you can have a Service running background BLE scanning all the time (although your users may notice severe battery drain). It doesn't matter what are you scanning for. Neither iBeacons, Eddystone or other type of adv packets are privileged in any way (like iBeacons are on iOS), so it is up to the app to decide what it is scanning for (using filters or by checking received adv data). Of course some standards, like Eddystone, are supported by some apps (like Google Play Services->Nearby which allows you to scan and receive attachments from the cloud while keeping the battery drain on a fairly good level), but if you use the Bluetooth LE scanner it doesn't really matter.

    If you want to scan in background you have to have a Service running where you have to implement the LE scanner callback and start scanning. You may also scan from the Activity, but it will only work when the activity is in foreground, otherwise it can be killed any time. Then make sure you don't stop scanning in onPause(), which is called when the screen goes off.

    When the screen is off a good practice to let user know about the beacon is using the Notifications. You may set the priority to any level you want if you want to attract user's attention (also keep in mind that users don't want to be alerted when they don't need to be).

    BR, Aleksander

  • Thank you for the great and detailed reply. This was EXACTLY to info I was looking for :) Best regards and thank you again! John

  • Hi CT_Engr

    I have some questions about your app.

    1. Are you using IOS Ibeacon's API?

    2. How fast your app detects a close beacon in background mode? Do you know how often your app scans in background ( Black screen )

    3. Have you noticed a considerable battery drain ??

    Thanks in advance

Related