Hola estaba practicando con la aplicación WalkieTalkie y quería hacer socket por 3G y no por IP local, he realizado estos cambios pero no hace soket:
Alguien sabe los cambios que hay que hacer?
Aplicación:
https://www.b4x.com/android/forum/attachments/walkie-talkie-zip.18141/
Public Sub UpdateUI
'this sub is responsible for updating the UI based on the state which is stored in the service
Dim wifi = True, bt = True, discover = True As Boolean
If admin.IsEnabled = False Then
bt = False
discover = False
End If
lblIP.Text = Connector.MyIP
lblWifiStatus.Text = Connector.WifiStatus
lblBTStatus.Text = Connector.BTStatus
If Connector.WifiConnected Then lblWifiStatus.TextColor = Colors.Green Else lblWifiStatus.TextColor = Colors.Red
If Connector.BTConnected Then lblBTStatus.TextColor = Colors.Green Else lblBTStatus.TextColor = Colors.Red
If spnrPairedDevices.Size = 0 Then bt = False
If Connector.BTConnected OR Connector.WifiConnected Then
wifi = False
bt = False
discover = False
End If
If wifi AND Regex.IsMatch("[^.]+\.[^.]+\.[^.]+\.[^.]+", edtIP.Text) = False Then
wifi = False
End If
Connector.MyIP=HayInternet
If Connector.MyIP.Length = 0 OR Connector.MyIP = "127.0.0.1" Then
wifi = False
End If
If searchInProgress Then bt = False
btnConnectBT.Enabled = bt
'btnConnectWifi.Enabled = wifi
btnBTSearch.Enabled = discover
btnMakeDiscoverable.Enabled = discover
lblPTT.Visible = Connector.BTConnected OR Connector.WifiConnected
End Sub
Sub HayInternet
Dim server As ServerSocket 'Add a reference to the network library
server.Initialize(0, "")
'If server.GetMyIP = "127.0.0.1" Then 'this is the local host address
'no connection
Return server.GetMyIP
'End If
Return True
End Sub
Alguien sabe los cambios que hay que hacer?
Aplicación:
https://www.b4x.com/android/forum/attachments/walkie-talkie-zip.18141/
Public Sub UpdateUI
'this sub is responsible for updating the UI based on the state which is stored in the service
Dim wifi = True, bt = True, discover = True As Boolean
If admin.IsEnabled = False Then
bt = False
discover = False
End If
lblIP.Text = Connector.MyIP
lblWifiStatus.Text = Connector.WifiStatus
lblBTStatus.Text = Connector.BTStatus
If Connector.WifiConnected Then lblWifiStatus.TextColor = Colors.Green Else lblWifiStatus.TextColor = Colors.Red
If Connector.BTConnected Then lblBTStatus.TextColor = Colors.Green Else lblBTStatus.TextColor = Colors.Red
If spnrPairedDevices.Size = 0 Then bt = False
If Connector.BTConnected OR Connector.WifiConnected Then
wifi = False
bt = False
discover = False
End If
If wifi AND Regex.IsMatch("[^.]+\.[^.]+\.[^.]+\.[^.]+", edtIP.Text) = False Then
wifi = False
End If
Connector.MyIP=HayInternet
If Connector.MyIP.Length = 0 OR Connector.MyIP = "127.0.0.1" Then
wifi = False
End If
If searchInProgress Then bt = False
btnConnectBT.Enabled = bt
'btnConnectWifi.Enabled = wifi
btnBTSearch.Enabled = discover
btnMakeDiscoverable.Enabled = discover
lblPTT.Visible = Connector.BTConnected OR Connector.WifiConnected
End Sub
Sub HayInternet
Dim server As ServerSocket 'Add a reference to the network library
server.Initialize(0, "")
'If server.GetMyIP = "127.0.0.1" Then 'this is the local host address
'no connection
Return server.GetMyIP
'End If
Return True
End Sub