public void readBatteryLevel ( final Callback < BatteryLevel > callback ) { gattClient . getBatteryProfile ( ) . getBatteryLevel ( new BatteryLevelCallback ( ) { @ Override public void onBatteryLevel ( int percentage ) { callback . onResult ( new BatteryLevel ( percentage ) ) ; } } ) ; }
Read the battery level .