-
Notifications
You must be signed in to change notification settings - Fork 30
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
Not working on Android #15
Comments
Hello, If you try to run directly with the example code, there seems to be a mistake in it (I'm running on Android).
Tl;dr: These are are valid ways to connect but @Introvertuous 's example is flawed // the two open brokers provided by eclispe are:
// ws://iot.eclipse.org:80/ws (non SSL)
// ws://iot.eclipse.org:443/ws (SSL)
// this will resolve to ws://iot.eclipse.org:443/ws => ok
const client = new Paho.MQTT.Client(
'ws://iot.eclipse.org:443/ws',
'clientId'
);
// this will resolve to ws://iot.eclipse.org:443/mqtt => does not exist!
const client = new Paho.MQTT.Client(
'iot.eclipse.org',
443,
'clientId'
);
// this will resolve to ws://iot.eclipse.org:443/ws => ok
const client = new Paho.MQTT.Client(
'iot.eclipse.org',
443,
'/ws',
'clientId'
); That might solve your issue? |
@nicolascouvrat is correct, but for some reason, the example I created did work properly (messages were received on the other end of the socket). I will fix that when I get a chance but I have a feeling this error is being caused by something else. |
How to set with server ip address instead or using 'iot.eclipse.org', and '443'. Means I want to say can we use Ip address like: '192.21.23.210' and port number '1883'. If anybody know, please reply. I already try, but in android is not working!! |
My app works fine in debug, but when I generate the release apk I get AMQJS0007E (same device, same network). Any ideas? |
我也遇到相同问题了,您的问题解决了吗 |
请问您的问题解决了吗,我和您遇到了相同的问题 |
我是用您的事例还是连接失败,请问有什么好的解决方法吗 |
@chentianci123 , 你好,你的问题解决了吗?我现在遇到了同样的问题,我查看资料好像是说这个插件只支持websocket,不支持TCP |
你问题解决了吗,我的react native 0.57.8 react-native-mqtt1.3.1 |
Hi! I was able to get the release APK working by adding
|
The package works perfectly on iOS. However, when I run on Android, with the exact same parameters and code, I get this (AMQJS0007E Socket error:undefined). Any solutions?
The text was updated successfully, but these errors were encountered: