Hi I am using Android paho library for getting connect with an mqtt server.
My app level Gradle side Code :
implementation 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.1.0'
implementation 'org.eclipse.paho:org.eclipse.paho.android.service:1.1.1'
Project Level
allprojects {
repositories {
jcenter()
maven {
url "https://repo.eclipse.org/content/repositories/paho-snapshots/"
}
maven { url "https://jitpack.io" }
maven {
url "https://maven.google.com"
}
}
}
In Manifest File
<service android:name="org.eclipse.paho.android.service.MqttService" />
permisiions
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
My issue is I am able to connect, publish data and subscribe to a topic when my server url is tcp://:1883
When I changed my url to mqtts://:8883 its failed to get connect
So what is the difference in the schemes tcp:// and mqtts:// or mqtt:// Why I am not able to connect if scheme starts with mqtt?
Please help!!!