FLIR One Developer / Blog / Topics / battery percentage / battery.getPercentage() was changed

battery.getPercentage() was changed

Home Forums FLIR Mobile SDK Development Android Development battery.getPercentage() was changed

This topic contains 2 replies, has 2 voices, and was last updated by Profile photo of Dani Dani 3 weeks, 5 days ago.

Viewing 3 posts - 1 through 3 (of 3 total)

  • Author

    Posts

  • #12298

    Profile photo of Daniel
    Daniel

    Participant

    I recently updated the Flir SDK and my battery-level-getting method has stopped working. It used to use battery.getPercentage(), but it appears this method has vanished in the update, and I can’t figure out how to properly get this working with the new battery.percentage().get() method. It seems overly complicated now – could someone help me with this please?

    #12350

    Profile photo of Daniel
    Daniel

    Participant

    To anyone who runs into the same problem: do not use the battery.percentage().get() method, use battery.percentage().getSync() method instead and it will act the same way as the old battery.getPercentage() method.

    #14673

    Profile photo of Dani
    Dani

    Participant

    +1

    This is because they have used reactive programming (like RxJava or RXAndroid).

    It’s very bad that a programming standard is not followed for the entire SDK and much worse that there is no documentation of the functionalities.

    This change has been appeared on v1.3.0

    Dani

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.