Android Question get Server IP-Adress

Andreas_D99

Member
Licensed User
Hello @all,

I using the mysql-Library to connect my Anroid-Device with a mySQL-Database on a Windows-Server:
(via WLan)

B4X:
...
Sub Globals

Dim mh1 As MysqlHandler
Dim rs1 As ResultSet

End Sub

Sub Activity_Create(FirstTime As Boolean)
  
  mh1.Initialize("192.168.0.51:3307", "myDatabase","myUser","myPassword")   
  If mh1.isConnected = False Then
      Msgbox(mh1.SQLError, "Connection Error:")
      Return
  End If

End Sub

In this Example the Server-IP is "192.168.0.51".
Ho can I get the IP-Adress from the Windows-Server, the Android-Device is connected to?

Thanks... :)
 

DonManfred

Expert
Licensed User
Longtime User
The app is NOT connected to any Windows-Server.

It is connected to an Accesspoint (Wifi-AP)
 
Upvote 0
Top