Android Studio - MQTT not connecting

后端 未结 4 1145
不思量自难忘°
不思量自难忘° 2020-12-10 18:26

I have just started learning using MQTT protocol with Android Studio. Using mosquitto broker, I am able to exchange messages between pub/sub

4条回答
  •  囚心锁ツ
    2020-12-10 18:34

    I had the same issue with MQTT publisher from an android device. While referring to tcp://localhost:1883 from an android emulator, I had to use http://10.0.2.2:1883 since emulator runs on its own VM and localhost would be emulators own loopback address.

提交回复
热议问题