-
Notifications
You must be signed in to change notification settings - Fork 890
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
subscribe have no call back when the message arrived when i use this method "public IMqttToken subscribe(String[] topicFilters, int[] qos, IMqttMessageListener[] messageListeners)" #262
Comments
shun1249844726
changed the title
subscribe
subscribe have no call back when the message arrived when i use this method "public IMqttToken subscribe(String[] topicFilters, int[] qos, IMqttMessageListener[] messageListeners)"
Nov 15, 2017
Governa
pushed a commit
to Governa/paho.mqtt.android
that referenced
this issue
Oct 5, 2019
Returning null causes problems with all subscribes that receive `IMqttMessageListener` as parameter.
Governa
pushed a commit
to Governa/paho.mqtt.android
that referenced
this issue
Oct 5, 2019
Always returning null breaks the contract set in the function signature and documentation. This affects all subscribes that receive `IMqttMessageListener` as parameter.
Governa
pushed a commit
to Governa/paho.mqtt.android
that referenced
this issue
Oct 5, 2019
Always returning null breaks the contract set in the function signature and documentation. This affects all subscribes that receive `IMqttMessageListener` as parameter. Signed-off-by: Fernando Governatore <affqlixo+eclipse@gmail.com>
Governa
pushed a commit
to Governa/paho.mqtt.android
that referenced
this issue
Oct 10, 2019
On subscribe, a failure would be reported but onSuccess would never be called. The reason was not passing the IMqttActionListener forward to MqttClient.
Governa
pushed a commit
to Governa/paho.mqtt.android
that referenced
this issue
Oct 10, 2019
On subscribe, a failure would be reported but onSuccess would never be called. The reason was not passing the IMqttActionListener forward to MqttClient. Signed-off-by: Fernando Governatore <affqlixo+eclipse@gmail.com>
hannesa2
referenced
this issue
in hannesa2/paho.mqtt.android
Nov 15, 2020
Always returning null breaks the contract set in the function signature and documentation. This affects all subscribes that receive `IMqttMessageListener` as parameter. Signed-off-by: Fernando Governatore <affqlixo+eclipse@gmail.com> Should pass IMqttActionListener on subscribe (#262) On subscribe, a failure would be reported but onSuccess would never be called. The reason was not passing the IMqttActionListener forward to MqttClient. Signed-off-by: Fernando Governatore <affqlixo+eclipse@gmail.com>
implementation 'androidx.legacy:legacy-support-v4:1.0.0' // Required, for Android version 4.x
implementation 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.1.0'
implementation 'org.eclipse.paho:org.eclipse.paho.android.service:1.1.1' Same problem: public IMqttToken subscribe(String[] topicFilters, int[] qos, Object userContext, IMqttActionListener callback, IMqttMessageListener[] messageListeners) throws MqttException {
IMqttToken token = new MqttTokenAndroid(this, userContext, callback, topicFilters);
String activityToken = storeToken(token);
mqttService.subscribe(clientHandle, topicFilters, qos, null, activityToken, messageListeners);
return null;
} |
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I use
I found a problem
why
this function return null In the source code
in "package org.eclipse.paho.android.service;"-“MqttAndroidClient”;
It will lead to the calling function will fail
for example
it will not call the "messageArrived" method when the message arrived from server
while the below method will call normally
Console Log output (if available):
The text was updated successfully, but these errors were encountered: