android-js / androidjs

Platform to build android app using node js
MIT License
465 stars 109 forks source link

Mqtt Broker: Mosca #107

Open DouglasFlores-fun opened 4 years ago

DouglasFlores-fun commented 4 years ago

I'm trying to run mosca with androidjs but it does not work,

¿Is it possible to do it? ¿How should I do it?

Chhekur commented 4 years ago

You can use any NPM package with Android JS. could you please elaborate, what is actual problem you are facing ?

DouglasFlores-fun commented 4 years ago

Thank you for your answer. I am new on nodejs and your package android Js.

I have tested and it works wonderfull, but If I tried to access to the web site from other device I can't get a response. Only work with the webdriver that is included.

I am trying to get remote response because I am trying to connect an electronic device like arduino or esp. So, I would like to get the webpage from other device.

Chhekur commented 4 years ago

Thank you for your answer. I am new on nodejs and your package android Js.

I have tested and it works wonderfull, but If I tried to access to the web site from other device I can't get a response. Only work with the webdriver that is included.

I am trying to get remote response because I am trying to connect an electronic device like arduino or esp. So, I would like to get the webpage from other device.

If you just want to get webpage from other device. So you can directly use any HTTP server such as express or whatever you like, then you have to tunnel that port so that you can that in remote device, for tunneling you can use tunnelme or ngrok.

Feek free to ask in can of any problem ; )

DouglasFlores-fun commented 4 years ago

Thank you. I try using express. Get the apk with androidJS and installed on my cell phone. I tryed to connect with a browser on the same the device but it failed. Connection refused.

Chhekur commented 4 years ago

Thank you. I try using express. Get the apk with androidJS and installed on my cell phone. I tryed to connect with a browser on the same the device but it failed. Connection refused.

Did you forward the port so that it'll accessible to outside world ?

DouglasFlores-fun commented 4 years ago

Yes, I used app.listen(3002, '0.0.0.0'). Work fine on my pc and on termux, but when I create the package it does not work.

Chhekur commented 4 years ago

you run the app on port 3002 and bind on 0.0.0.0 but you didn't forward it, so it won't be accessible over the internet

Chhekur commented 4 years ago

Hey, we have created a slack channel for support & discussion: join here

DouglasFlores-fun commented 4 years ago

Thank you. I will join.