Author Topic: Enhancement Request - Report Battery Status  (Read 6119 times)

0 Members and 1 Guest are viewing this topic.

mccljs

  • Guest
Enhancement Request - Report Battery Status
« on: January 21, 2013, 06:08:08 AM »
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.

reinhardholzner

  • Guest
Re: Enhancement Request - Report Battery Status
« Reply #1 on: January 21, 2013, 10:09:57 AM »
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.

Offline Filip Havlicek

  • Avast team
  • Massive Poster
  • *
  • Posts: 2647
Re: Enhancement Request - Report Battery Status
« Reply #2 on: January 21, 2013, 10:20:18 AM »

reinhardholzner

  • Guest
Re: Enhancement Request - Report Battery Status
« Reply #3 on: January 21, 2013, 10:37:13 AM »
also broadcast based... will be expensive

Offline Filip Havlicek

  • Avast team
  • Massive Poster
  • *
  • Posts: 2647
Re: Enhancement Request - Report Battery Status
« Reply #4 on: January 21, 2013, 11:23:01 AM »
Well, you can always make it opt-in.

Filip

mccljs

  • Guest
Re: Enhancement Request - Report Battery Status
« Reply #5 on: January 21, 2013, 04:13:28 PM »
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
« Last Edit: January 21, 2013, 04:22:34 PM by mccljs »

Offline Filip Havlicek

  • Avast team
  • Massive Poster
  • *
  • Posts: 2647
Re: Enhancement Request - Report Battery Status
« Reply #6 on: January 21, 2013, 04:40:29 PM »
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

mccljs

  • Guest
Re: Enhancement Request - Report Battery Status
« Reply #7 on: January 21, 2013, 04:48:41 PM »
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

Offline Filip Havlicek

  • Avast team
  • Massive Poster
  • *
  • Posts: 2647
Re: Enhancement Request - Report Battery Status
« Reply #8 on: January 21, 2013, 04:55:06 PM »
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

mccljs

  • Guest
Re: Enhancement Request - Report Battery Status
« Reply #9 on: January 21, 2013, 05:00:35 PM »
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

Offline Filip Havlicek

  • Avast team
  • Massive Poster
  • *
  • Posts: 2647
Re: Enhancement Request - Report Battery Status
« Reply #10 on: January 31, 2013, 11:56:51 AM »
Hi,

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

Filip

mccljs

  • Guest
Re: Enhancement Request - Report Battery Status
« Reply #11 on: January 31, 2013, 09:37:08 PM »
Thanks.

REDACTED

  • Guest
Re: Enhancement Request - Report Battery Status
« Reply #12 on: November 18, 2014, 02:37:38 PM »
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.

REDACTED

  • Guest
Re: Enhancement Request - Report Battery Status
« Reply #13 on: November 23, 2014, 06:01:13 AM »
It is a bug, thanks for the report.

REDACTED

  • Guest
Re: Enhancement Request - Report Battery Status
« Reply #14 on: November 24, 2014, 02:47:18 PM »
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.