Android Question [SOLVED] I need to get battery level

boralogy

Member
Licensed User
ok SOLVED
B4X:
Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.

    Private bat_lvl As Label
    Private Label1 As Label
    Dim hg As PhoneEvents
End Sub

Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    Activity.LoadLayout("low_main")
   

hg.Initialize("hg")



End Sub
Sub hg_BatteryChanged (Level As Int, Scale As Int, Plugged As Boolean, Intent As Intent)
   bat_lvl.Text = Level
End Sub
 
Top