I'm trying to run the "Autodiscover" example:
https://www.b4x.com/android/forum/threads/mqtt-chat-with-auto-discovery.75713/#content
Problem 1:
Android 6 can not find the server (Android 4.4 as server)
Problem 2:
If Android 6 is a server, Android 4.4 can find and connect to the server, but If Android 6 trying to go back (by pressing the Back key) causes this error (And the app quits and a warning pops up):
[Note: If Android 4.4 is the server, if server trying to go back (pressing the Back key) DOES NOT cause this error]
Problem 3:
Android 2.3.6 did not run, got error.
(I understand it is a very old version of Android, so I'm not too worried about it, I'm more concerned about Android 6)
This error occurs when you try to type something in the text box:
https://www.b4x.com/android/forum/threads/mqtt-chat-with-auto-discovery.75713/#content
Problem 1:
Android 6 can not find the server (Android 4.4 as server)
Problem 2:
If Android 6 is a server, Android 4.4 can find and connect to the server, but If Android 6 trying to go back (by pressing the Back key) causes this error (And the app quits and a warning pops up):
[Note: If Android 4.4 is the server, if server trying to go back (pressing the Back key) DOES NOT cause this error]
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
Connected: true
all/connect: asdf
** Activity (main) Pause, UserClosed = false **
** Activity (chat) Create, isFirst = true **
** Activity (chat) Resume **
Discovered server: 192.168.1.30
** Activity (chat) Pause, UserClosed = true **
all/disconnect: asdf
starter_client_messagearrived (java line: 262)
java.lang.NullPointerException: Attempt to invoke virtual method 'org.eclipse.paho.client.mqttv3.IMqttDeliveryToken org.eclipse.paho.client.mqttv3.MqttAsyncClient.publish(java.lang.String, byte[], int, boolean)' on a null object reference
at anywheresoftware.b4j.objects.MqttAsyncClientWrapper.Publish2(MqttAsyncClientWrapper.java:100)
at b4a.example.starter._client_messagearrived(starter.java:262)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:186)
at anywheresoftware.b4a.BA$2.run(BA.java:360)
at android.os.Handler.handleCallback(Handler.java:746)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5443)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
Problem 3:
Android 2.3.6 did not run, got error.
(I understand it is a very old version of Android, so I'm not too worried about it, I'm more concerned about Android 6)
This error occurs when you try to type something in the text box:
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
Discovered server: 192.168.1.32
java.lang.NoClassDefFoundError: android.animation.AnimatorSet
at com.wrapp.floatlabelededittext.FloatLabeledEditText.setShowHint(FloatLabeledEditText.java:161)
at com.wrapp.floatlabelededittext.FloatLabeledEditText.access$0(FloatLabeledEditText.java:153)
at com.wrapp.floatlabelededittext.FloatLabeledEditText$1.afterTextChanged(FloatLabeledEditText.java:116)
at android.widget.TextView.sendAfterTextChanged(TextView.java:6598)
at android.widget.TextView$ChangeWatcher.afterTextChanged(TextView.java:6787)
at android.text.SpannableStringBuilder.sendTextHasChanged(SpannableStringBuilder.java:897)
at android.text.SpannableStringBuilder.change(SpannableStringBuilder.java:353)
at android.text.SpannableStringBuilder.change(SpannableStringBuilder.java:269)
at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:432)
at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:409)
at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:28)
at android.view.inputmethod.BaseInputConnection.replaceText(BaseInputConnection.java:654)
at android.view.inputmethod.BaseInputConnection.commitText(BaseInputConnection.java:180)
at com.android.internal.widget.EditableInputConnection.commitText(EditableInputConnection.java:120)
at com.android.internal.view.IInputConnectionWrapper.executeMessage(IInputConnectionWrapper.java:283)
at com.android.internal.view.IInputConnectionWrapper$MyHandler.handleMessage(IInputConnectionWrapper.java:79)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3687)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
at dalvik.system.NativeStart.main(Native Method)