Enhancement Request - Report Battery Status

I would like to see the device report its battery status (charge level) when it reports program status and when it reports its location.

The battery status would then show in the Security Info screen for the device on the website.

unfortunately we can just send an SMS upon LOW-BATTERY-EVENT (which is broadcasted into the system).
there is no programming interface (API) for 3rd party developers in android SDK that allows us to read the current battery level.

Available from API 5 it seems: http://developer.android.com/training/monitoring-device-state/battery-monitoring.html

Filip

also broadcast based… will be expensive

Well, you can always make it opt-in.

Filip

Thanks for the replies. I see so many apps that report battery status so I thought it was easy information to get.

I did find information in the link that Filip posted that indicates you can get battery status without registering a receiver but I am not an Android programmer so I may be reading it wrong. http://developer.android.com/training/monitoring-device-state/battery-monitoring.html

John

Nah, it is a receiver and I agree that it might have an impact on battery, that really depends on how often the broadcast is being sent. If it would be, let’s say, hundreds of times per charge, then I think it might be fine if coded properly. Thousands of invocations might cause some issues I imagine.

Filip

Thanks for the reply Filip.

I was looking at the statement “Because it’s a sticky intent, you don’t need to register a BroadcastReceiver—by simply calling registerReceiver passing in null as the receiver as shown in the next snippet, the current battery status intent is returned.”

I took that to mean that you can make a call whenever you want to get the status, without having to receive periodic broadcast information.

I am asking mainly out of curiosity. I am a programmer but I have never done any Android programming.

John

Ye, it’s possible, but you won’t get realtime stats like that. If you want a rough information (for example an hourly report) then it’s possible this way. If you want it to be precise (~ every change in the percentage for example), you need the receiver.

Filip

My initial enhancement request was that the device report the battery status when it reports the program status (I have mine set to every 60 minutes) and also when it reports its location. So I thought that the battery status inquiry could just be made at the reporting time instead of monitoring the status continually.

Thanks for all of the information.

John

Hi,

we agreed that it will be included in the program status.

Filip

Thanks.

Going to MyAvast - Info Page, Communication with Device seems OK…
Last communication is changing, but Battery status always stays the same… the last few weeks…
It has been OK before, but now not updating any more… always at 88% now.
Is this a wrong setting somewhere? I don’t remember to have changed something…

Maybe not working any more for other reasons?
THX for info.

It is a bug, thanks for the report.

OK, thanks for info about in-correct battery information, so waiting to be corrected…

Maybe there is also an other bug I found…

In Avast Account page, going to Reward/Badges and mouse-over, there is a white rectangular box poping up… “without any text in it”…
Some boxes show “install” in green, but no other text at all…

Could this be related to some minimal needed flash or java-version to be installed?
I beleve to have seen there was also text before last week… now this text is not showing any more.

This is strange, because the dialogue is black originally; what is the browser&version? OS? Thanks!

Dear Avast Team,

Tested several options, and located +/- the problem… but personaly can not find the solution…

Situation test:
Used 2 different laptops : 1 with windows 7 32bit fully updated AND other with windows 8.1 64bit fully updated… and the problem is identical, so in my opinion not system related… no difference here, problem stays.

Standard browser is set on “FIREFOX ESR-channel version 24.8.1… latest version FF ESR with old type interface”… see screenshot.
I use the older one because of the later version has the newer type of interface… whith less options…
Maybe that is the problem, that avast site is not compatibel any more and uses only the newer Firefox interface???

I also tested with an old portable Opera version 12.16 where even “NO popup apears” ( not white nor black ).

Found out on both PC’s that when manual selecting “internet explorer” works well, and is showing black popups and text.

Problem is situated when using “older Firefox-type browsers”? In my case “FIREFOX ESR 24.x”-series
Plugin related? Or newer protocols?

Thanks for info about this…

*** Original question about battery value not changing… will this be corrected too?

Thanks a lot, seems we are not handling some calls in JS correctly - I will pass it to the my avast team.