BlueText/bigsky — pull request #38 by aguibert (2013-11-29 07:13:00+00:00)
Title: Wire up the rest of battery level indicator

We update the battery level indicator in two different ways:
A) When the initial connection between the phone and PC is established, the PC requests the phone's battery level so that we have some initial value for sure.
B) This option always happens excluding the initial request. The phone has a built in battery level listener on it that polls about every 10 second. I attached a listener to this, and if the battery level changes (ex: from 89% to 88%) then the phone will send a response to the PC on it's own and the PC gui will update.

I thought that having the phone send updates whenever we need one rather than the PC asking for an update every X minutes was a better option. This way we get precise updates and minimal traffic on the stream.