Android Question How to Know the Mobile Battery Health in Words? (Good or Bad)

Pravee7094

Active Member
Hello all,
I just want to know the mobile battery health in words.
I using below code :
B4X:
Sub Process_Globals
    Private gp_phoneevents As PhoneEvents
End Sub

Sub Service_Create
    gp_phoneevents.Initialize("PhoneEvents")
End Sub

Sub PhoneEvents_BatteryChanged (Level As Int, Scale As Int, Plugged As Boolean, Intent As Intent)
    Dim ls_health As Int = Intent.GetExtra("health")
    Log("Health : " & ls_health)
End Sub

The Log result is :
B4X:
Health : 2

Now Question is, What is the means by "2"?
It's mean by Good or bad ?

Anyone Can Explain ? or any suggestion ?

Thanks
 

agraham

Expert
Licensed User
Longtime User
This might help. There is a BatteryUtilities class in the BatteryProgressView library that can give you more battery information without waiting for an event

 
Upvote 0
Top