John Christian De Chavez John Christian De Chavez - 1 year ago 182
Android Question

cordova angular cannot connect to


is working with
in a webview. But when I try to compile my app to android, it seems that
cannot connect to my

As I console everything to my node server for connection events, it doesn't trigger the
event as seen below:

console.log('My socket id is ';

My node console works properly when I try to run the app in a browser. But using the android app extracted from cordova it seems it cannot connect.

UPDATE: this is my
file in my app

<?xml version='1.0' encoding='utf-8'?>
<widget id="com.myapp.pagemanager" version="0.0.1" xmlns="" xmlns:cdv="">
A sample Apache Cordova application that responds to the deviceready event.
<author email="" href="">
Apache Cordova Team
<content src="index.html" />
<plugin name="cordova-plugin-whitelist" spec="1" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<platform name="android">
<allow-intent href="market:*" />
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />

Answer Source

i already solved my problem. what i did is to make it work in a simulator so that i can debug or see easily the errors. and i fount out the the path in mobile is always starting in file:// blah blah when i use the native script code to get current path. and thats why its not connecting to my Nodejs Server. and everything is fixed now. thank you! SO'ers.