I want to create a chat application in the Titanium appcelerator using the Strophe.js library. I went through strophe js libraries and their documents. I believe that we can use strophe.js to create an xmpp based application for chatting on the web.
Thanks, please, can someone clarify the following doubts:
- Is it possible to use strophe js inside our Titanium Appcelerator, if so, suggest me how to use it. I tried to enable the js stanza inside titanium, which shows that I can not find the module error
Here is the code I tried with.
Ti.include("includes/strophe.js"); Ti.include("includes/strophe.register.js"); connection.register.connect("localhost:5280", callback, wait, hold); var callback = function (status) { if (status === Strophe.Status.REGISTER) { connection.register.fields.username = "newuser"; connection.register.fields.password = "123456"; connection.register.submit(); } else if (status === Strophe.Status.REGISTERED) { console.log("registered!"); connection.authenticate(); } else if (status === Strophe.Status.CONNECTED) { console.log("logged in!"); } else {
- Can you suggest using any other libraries that you can use inside the Titanium Appceleartor to create a chat application using XMPP
source share