iOS Question Is there a way to tell if device on external power?

Discussion in 'iOS Questions' started by Turbo3, Mar 19, 2015.

  1. Turbo3

    Turbo3 Active Member Licensed User

    Is there a way to tell if the iOS device is running on external power instead of off internal battery power?
  2. Erel

    Erel Administrator Staff Member Licensed User

    '0 = Unknown, 1 = Unplugged, 2 = Charging, 3 = Full
    Sub BatteryState As Int
    Dim no As NativeObject
       no = no.Initialize(
    If no.GetField("batteryMonitoringEnabled").AsBoolean = False Then
    End If
    Return no.GetField("batteryState").AsNumber
    End Sub
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice