(Sorry for my bad English)
I have built an application with Ionic 2 for Android. In this application I need to get information from an API and it's works perfectly when I run do it in the browser (ionic serve).
The problem is when I run on my device (Android 6.0.1) I get this issue :
net::ERR_CONNECTION_TIMED_OUT
Then I searched how to resolve this and I tried many things.
I have the cordova-plugin-whitelist and my config.xml looks like :
<content src="index.html" />
<allow-navigation href="*" />
<allow-intent href="*" />
<access origin="*" subdomains="true" />
and I put this in my index.html :
<meta http-equiv="Content-Security-Policy" content="default-src *; style-src * 'unsafe-inline'; script-src * 'unsafe-inline' 'unsafe-eval'; img-src * data: 'unsafe-inline'; connect-src * 'unsafe-inline'; frame-src *; media-src *;">
I have read many documentation concerning this issue but I didn't find anything really helpful.
Can someone help me please ?
Thanks
All I have to do is to make sure ionic cordova run android -l -c -s
works on my android phone.
If step 2 cannot be done. Do the following on Windows 10 to enable the firewall setting on my laptop for Node.js Click here for picture of Enable firewall configuration
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With