how to get ibeacon battery level from advertisement data in android

786 Views Asked by At

I m trying to integrate ibeacons to my project and code written in Eclipse. I took the advertisement data. And parsed UUID, major, minor, calculated distance etc.

But i stucked at ibeacon's battery level. On the ios side lightblue app shows me beacon's battery level (etc:%100). But on android side i couldn't see any sample about it. Can somebody explain me how can i take battery level data from advertisement record?

Here is sample hex data from LogCat: 02:01:06:1a:ff:4c:00:02:15:e2:c5:6d:b5:df:fb:48:d2:b0:60:d0:f5:a7:10:96:e0:00:00:00:00:c5:02:0a:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00

Thanks

1

There are 1 best solutions below

0
On BEST ANSWER

The answer to this question depends on the beacon manufacturer. Reporting the battery level is not part of any beacon standard.

Some manufacturers add an extra byte somewhere in the beacon advertisement that indicates the battery level, but this does not appear to be the case in the byte sequence you posted. You may wish to augment your question with the specifics of the type of beacon you are using.