... process global
Dim PE As PhoneEvents
End Sub
Sub PE1_BatteryChanged (Level As Int, Scale As Int, Plugged As Boolean, Intent As Intent)
Log("BatteryChanged: Level = " & Level & ", Scale = " & Scale & ", Plugged = " & Plugged)
End Sub
Sub Activity_Create(FirstTime As Boolean)
PE.Initialize("PE1")
....
end sub