iOS Question AirPlaneMode check sometimes wrong

mcorbeel

Active Member
Licensed User
Longtime User
I use this piece of code to check airplane mode on an iPhone. Some users complain that it gives "True" even when they are on a network. Is there something wrong?

Code:
Sub Device_AirPlaneMode() As Boolean
    Dim R As Boolean = False
   
    Dim myLan As ServerSocket 'ignore
    Dim sDeviceIP As String = myLan.GetMyWifiIP
    If sDeviceIP = "127.0.0.1" Then
        R = True
    End If
      
    Return r
End Sub
 
Maybe so.
Is my code correct for 4G too? Is should give false when not connected to wifi but connected to 4G (not airplane mode).
 
Upvote 0
Back
Top