Android Question Socket problem with Release version on lollipop

micro

Well-Known Member
Licensed User
Hi to all,
I have created a small code for socket connection, in Debug legacy or rapid it's work, while with release installation the connection fails.

B4X:
Sub Connetti(ip As String, porta As String)
Dim port As Int
      If socket_v.IsInitialized = False Then socket_v.Initialize("socketvar")
     If IsNumber(porta) Then port = porta
     socket_v.Connect(ip, port, 5000)
End Sub

Sub socketvar_Connected (Successful As Boolean)
    Try
    If    Successful = False Then
        ToastShow("Errore connessione", 2)
        If socket_v.Connected = True Then socket_v.Close
        socket_v.Initialize("socketvar")
        connesso = False
        Return
    End If
...........
...........
always appears the message "Errore connessione".
Where is the problem?

Thanks
 
Top