Hello Sir and friends !
I have seen your sharing at https://www.hivemq.com/blog/mqtt-client-library-enyclopedia-paho-android-service/
and then ı want to try your example of source code ,
But ı have got a trouble as below;
"IMqttToken token = client.connect(options);" this code block gives error also connection() event.
would you please help me that whats wrong ?
I have tried too much stuff ...
Hello Sir and friends ! I have seen your sharing at https://www.hivemq.com/blog/mqtt-client-library-enyclopedia-paho-android-service/ and then ı want to try your example of source code , But ı have got a trouble as below; "IMqttToken token = client.connect(options);" this code block gives error also connection() event. would you please help me that whats wrong ? I have tried too much stuff ...
package com.example.button2;
import androidx.appcompat.app.AppCompatActivity;
import android.annotation.SuppressLint; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; import android.widget.Toast;
import org.eclipse.paho.android.service.MqttAndroidClient; import org.eclipse.paho.client.mqttv3.IMqttActionListener; import org.eclipse.paho.client.mqttv3.IMqttToken; import org.eclipse.paho.client.mqttv3.MqttClient; import org.eclipse.paho.client.mqttv3.MqttConnectOptions; import org.eclipse.paho.client.mqttv3.MqttException; import org.eclipse.paho.client.mqttv3.MqttMessage;
import java.io.UnsupportedEncodingException;
public class MainActivity extends AppCompatActivity { TextView txt1,txt2;
}