D diego Member Licensed User Longtime User Sep 30, 2018 #1 Since last update to targetversion 26 the battery_changed event seems doesn't launch at start. Is there a way to force the event or ask for battery level programatically? Thanks
Since last update to targetversion 26 the battery_changed event seems doesn't launch at start. Is there a way to force the event or ask for battery level programatically? Thanks
Erel B4X founder Staff member Licensed User Longtime User Sep 30, 2018 #2 Tested with this code: Code: Copy Sub Service_Create Dim pe As PhoneEvents pe.Initialize("pe") End Sub Sub pe_BatteryChanged (Level As Int, Scale As Int, Plugged As Boolean, Intent As Intent) Log(Level) End Sub Seems to work fine. Upvote 0
Tested with this code: Code: Copy Sub Service_Create Dim pe As PhoneEvents pe.Initialize("pe") End Sub Sub pe_BatteryChanged (Level As Int, Scale As Int, Plugged As Boolean, Intent As Intent) Log(Level) End Sub Seems to work fine.
D diego Member Licensed User Longtime User Sep 30, 2018 #3 Thanks, I had moved pe.Initialize inside Sub Activity_PermissionResult. Now I put after Wait for permission and it's OK. Upvote 0
Thanks, I had moved pe.Initialize inside Sub Activity_PermissionResult. Now I put after Wait for permission and it's OK.