I'm trying to use the Poho MQTT library's JavaScript implementation ( http://eclipse.org/paho/clients/js ) in a NativeScript application.
I referenced the file with require("./lib/mqttws31");
and replaced all the window.timer
's with require("timer")
statements. I also added require("nativescript-websockets");
to the top of the mqttws31.js file after installing the module from github.com/NathanaelA/nativescript-websockets. I also commented out the bit of code referring to localstorage
.
I'm getting the application to run, but it doesn't seem to do anything.
您最好使用带有nativescript的webview webview界面在网页和nativescript之间进行双向控制,这更像是高级ionic或应该说Cordova应用
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.