How I find de battery information in method onBeaconsDiscovered?

I search for all beacons inside the method:

public void onBeaconsDiscovered(Region region, List beacons) {
   Log.d(TAG, "Ranged beacons: " + beacons);
          "Beacon Finded: " + beacons.get(0).getMajor() + " - " + beacons.get(0).getMinor(),

But in Beacons model no there is the battery information, only uuid, major, minor…
Where I find the battery information and how access this field?


Battery level is not part of the advertising packet in the iBeacon standard, so you’ll need to connect to the beacon to obtain it.

Take a look at the CharacteristicsDemo to see how to connect to a beacon.

The method you’re looking for is getBatteryPercent, from the BeaconConnection class.