Closed japita-se closed 7 years ago
@japita-se It is definitely possible to use MQTT over WebSockets with Cordova. If I had to guess, your issue is probably related to Cordova's Content Security Policy.
Make sure you whitelist the broker url with the correct port number. This plugin could help. Let me know if that fixes your problem.
Cordova don't include webkit ! It rely on mobile phone OS; CanIUse says IOS>=7.1 & Android >=4.4 support websocket; Make sure your os version; If you plan to support low version os , follow Crosswalk , or code cordova plugin with native code to connect mosca;
@japita-se I have created a native based plugin for Cordova here . It is hosted on my company's repository
Is it possible to user MQTTjs (browserMQTT) in a packed cordova webapp? I tried to port the web page I made by using cordova, but it seems that the websockets not work. Is it a problem of the cordova webkit?