Battery status how-to?

Hi all,
is there any way to access battery status using the MetaWear android api?

Any feedback would be appreciated.


  • Hi @biospank! I think that team are working on this right now, check this commit and use the android api using this version:
  • Thank you mar, I'll wait for the official new api release :)

    Keep up the good work guys!!
  • edited October 2014
    Hi @Eric,

    I tried to implement battery level on readBatteryLevel call and got the result on receivedGATTCharacteristic callback.

    after 4 days intense use, the data byte array parameter always return 0 (data[0])

    What kind of data should I expect from data?
    What does 0 (data[0]) mean?
    Thank you.

  • The index, data[0], will give you a value between [0, 100], indicating the battery level.  I'm not sure why you're getting a stuck 0 though.  Was the battery level reporting other values before and what values do you get if you plug the board in?  It's possible your battery is almost out of charge, which will result in a 0 being returned.
  • I always get 0 (zero) on every stage fully charged and almost completely discharged.

    Even if I plug or unplug usb cable.

    This happen on both, your and my app.
  • Hi @Eric,
    disconnecting the battery and turning it back on I get different result... seems to work now...
    I'll wait just to be sure :)
  • edited October 2014
    That's good to hear!  Still quite odd that you were always receiving a 0 though.
  • I am having a similar problem. I have soldered the battery on, but the battery level always reports 0, and the battery doesn't appear to charge when plugged in via USB. Is this a known issue? Do I have a defective battery, or board?
  • quzar,

    Does the MetaWear work at all with battery, but no usb? If not, then it is likely you have a defective battery. Did you buy the battery from us or was it an after-market part?
This discussion has been closed.