Check if Bluetooth Low Energy Beacons are nearby in Android

Background

I want to program an Android application that can detect if I enter or leave the region. Each region (say, a building) has a BLE Beacon in advertising mode. I know the top of the lighthouse. The application should run in the background and should be energy efficient. It is not important to immediately recognize the region, but 5 minutes is enough.

  • The http://developer.android.com/guide/topics/connectivity/bluetooth-le.html says that you should not "check the loop", but is there any other way to implement the regions that enter / leave events?

  • Also, I'm a little confused about UUIDs, services, and connections. Is it right that these questions are NOT relevant to my question?

  • As far as I understand from the Bluetooth specification, a beacon can only handle one connection. Therefore, my application should not actually connect to any beacons, if I'm interested, only if the beacon is nearby, because the connection will stop the beacon to advertise, and therefore other devices can no longer see it. Is it correct?

Related Questions

What I want to know seems to be a common question:

but most answers relate to the “Android iBeacon Library”, which I do not want to use.

+4
source share
2

iBeacon Android, , , , , . .

, :

  • , - , Bluetooth LE , "" . , , , API Android BLE, , . .

  • , BLE, . , , , . .

  • UUID BLE. Service UUID, GATT, BLE. ProximityUUID, Apple iBeacon , . . (. ), UUID GATT .

, iBeacons BLE. , , iBeacons Bluetooth- Mac. Android, , - iOS, , iOS Bluetooth Mac API-, Mac.

Android-, Bluetooth Mac iBeacon. , , , BLE. , Apple iBeacon ProximityUUID/major/minor , .

+4

iBeacon - Apple, "" Bluetooth Low Energy Advertising "iBeacon certification fee" . (0x004c), Apple. + + . Manufacturing, 0xff, : < 0x4c > < 0x00 >

+1

Source: https://habr.com/ru/post/1541724/


All Articles