Abbiate pazienza e sopportatemi oltre che supportarmi , alla compilazione mi viene fuori questo errore ma app gira lo stesso, vale dire trasmette e riceve i pacchetti (text) posto errore e codice completo tanto e cosa già stravista, non mi segnala errori a parte qualche variabile da modificare o eliminare visto il loro inutilizzo.
HELP @LucaMs @Star-Dust LO SO CHE VI STRESSO, ma abbiate pietà
HELP @LucaMs @Star-Dust LO SO CHE VI STRESSO, ma abbiate pietà
B4X:
#Region Shared Files
#CustomBuildAction: folders ready, %WINDIR%\System32\Robocopy.exe,"..\..\Shared Files" "..\Files"
'Ctrl + click to sync files: ide://run?file=%WINDIR%\System32\Robocopy.exe&args=..\..\Shared+Files&args=..\Files&FilesSync=True
#End Region
'Ctrl + click to export as zip: ide://run?File=%B4X%\Zipper.jar&Args=Project.zip
' versione slave
Sub Class_Globals
Private Root As B4XView
Private xui As XUI
Private TextSend As B4XView
Private ButtonSend As B4XView
Private RadioButton1 As B4XView
Private RadioButton2 As B4XView
Private RadioButton3 As B4XView
Private ListView1 As ListView
Dim SendData As UDPSocket
Dim Myaddress As String
Private MyPort As Int = 51015
End Sub
Public Sub Initialize
' B4XPages.GetManager.LogEvents = True
End Sub
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
Root.LoadLayout("MainPage")
setting
End Sub
private Sub setting
' eventneme + port + buffer
SendData.Initialize("SendData",MyPort,8192)
Myaddress = getMyAddress
End Sub
Private Sub getMyAddress As String
Dim Addr As String
Dim Serv As ServerSocket
' port + eventname
Serv.Initialize(51099,"serve_sub")
#IF B4J
Addr = Serv.GetMyIP
#Else
Addr = Serv.GetMyWifiIp
#End If
Return Addr
End Sub
Private Sub TextField_sub_Action
ButtonSend_Click
End Sub
Private Sub ButtonSend_Click
Dim bt As Button = Sender
Dim message As String
message = TextSend.Text
DateTime.DateFormat = "yymmdd-hhMMss"
Dim prefix As String = "+393929824007"
Dim sendtxt As String = prefix&message
Dim P As UDPPacket
P.Initialize( sendtxt.GetBytes("UTF8"),SendData.GetBroadcastAddress,MyPort)
SendData.Send(p)
TextSend.Text=""
End Sub
Private Sub SendData_PacketArrived (Packet As UDPPacket)
If Packet.HostAddress<>Myaddress Then
Dim datasend As String = DateTime.Now & " " & BytesToString(Packet.Data,0,Packet.Data.Length,"UTF8")
Dim lb As Label
lb.Initialize("lb")
lb.SingleLine=False
lb.Width=ListView1.Width-20
lb.Tag = "id001-lb-lc-100"
lb.Text = datasend
If ListView1.IsInitialized = False Then
ListView1.Initialize("ListView1")
End If
ListView1.AddSingleLine(lb.Text)
End If
End Sub
Private Sub ListView1_ItemClick (Position As Int, Value As Object)
End Sub
B4X:
Logger connesso a: samsung SM-T530
--------- beginning of main
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create (first time) **
Call B4XPages.GetManager.LogEvents = True to enable logging B4XPages events.
** Activity (main) Resume **
b4xmainpage_senddata_packetarrived (java line: 160)
java.lang.UnsupportedOperationException: addView(View, LayoutParams) is not supported in AdapterView
at android.widget.AdapterView.addView(AdapterView.java:706)
at anywheresoftware.b4a.objects.PanelWrapper.AddView(PanelWrapper.java:65)
at anywheresoftware.b4a.objects.B4XViewWrapper.AddView(B4XViewWrapper.java:326)
at b4a.example.b4xmainpage._senddata_packetarrived(b4xmainpage.java:160)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:221)
at anywheresoftware.b4a.BA$2.run(BA.java:395)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6134)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create (first time) **
Call B4XPages.GetManager.LogEvents = True to enable logging B4XPages events.
** Activity (main) Resume **
b4xmainpage_senddata_packetarrived (java line: 160)
java.lang.UnsupportedOperationException: addView(View, LayoutParams) is not supported in AdapterView
at android.widget.AdapterView.addView(AdapterView.java:706)
at anywheresoftware.b4a.objects.PanelWrapper.AddView(PanelWrapper.java:65)
at anywheresoftware.b4a.objects.B4XViewWrapper.AddView(B4XViewWrapper.java:326)
at b4a.example.b4xmainpage._senddata_packetarrived(b4xmainpage.java:160)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:221)
at anywheresoftware.b4a.BA$2.run(BA.java:395)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6134)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create (first time) **
Call B4XPages.GetManager.LogEvents = True to enable logging B4XPages events.
** Activity (main) Resume **
b4xmainpage_senddata_packetarrived (java line: 160)
java.lang.UnsupportedOperationException: addView(View, LayoutParams) is not supported in AdapterView
at android.widget.AdapterView.addView(AdapterView.java:706)
at anywheresoftware.b4a.objects.PanelWrapper.AddView(PanelWrapper.java:65)
at anywheresoftware.b4a.objects.B4XViewWrapper.AddView(B4XViewWrapper.java:326)
at b4a.example.b4xmainpage._senddata_packetarrived(b4xmainpage.java:160)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:221)
at anywheresoftware.b4a.BA$2.run(BA.java:395)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6134)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
Copying updated assets files (1)
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create (first time) **
Call B4XPages.GetManager.LogEvents = True to enable logging B4XPages events.
** Activity (main) Resume **
Error occurred on line: 90 (B4XMainPage)
java.lang.UnsupportedOperationException: addView(View, LayoutParams) is not supported in AdapterView
at android.widget.AdapterView.addView(AdapterView.java:706)
at anywheresoftware.b4a.objects.PanelWrapper.AddView(PanelWrapper.java:65)
at anywheresoftware.b4a.objects.B4XViewWrapper.AddView(B4XViewWrapper.java:326)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.shell.Shell.runVoidMethod(Shell.java:777)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:354)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:157)
at anywheresoftware.b4a.BA$2.run(BA.java:395)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6134)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create (first time) **
Call B4XPages.GetManager.LogEvents = True to enable logging B4XPages events.
** Activity (main) Resume **
Error occurred on line: 91 (B4XMainPage)
java.lang.UnsupportedOperationException: addView(View, LayoutParams) is not supported in AdapterView
at android.widget.AdapterView.addView(AdapterView.java:706)
at anywheresoftware.b4a.objects.PanelWrapper.AddView(PanelWrapper.java:65)
at anywheresoftware.b4a.objects.B4XViewWrapper.AddView(B4XViewWrapper.java:326)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.shell.Shell.runVoidMethod(Shell.java:777)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:354)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:157)
at anywheresoftware.b4a.BA$2.run(BA.java:395)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6134)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create (first time) **
Call B4XPages.GetManager.LogEvents = True to enable logging B4XPages events.
** Activity (main) Resume **
** Activity (main) Pause event (activity is not paused). **
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create (first time) **
Call B4XPages.GetManager.LogEvents = True to enable logging B4XPages events.
** Activity (main) Resume **
** Activity (main) Pause event (activity is not paused). **
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create (first time) **
Call B4XPages.GetManager.LogEvents = True to enable logging B4XPages events.
** Activity (main) Resume **