Build ionic network not working in android


#1

Hi everyone,
Ionic is great tool for me. Few days ago, I try follow getting started documentation, build new apps with ionic. Everything just fine at ionic serve environment with browser at computer, but when i build and install apps on android, networking ($http.get, img src etc) not working. My config.xml already contain access origin="*" and AndroidManifest.xml already contain

uses-permission android:name="android.permission.INTERNET"
uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"
uses-permission android:name=“android.permission.ACCESS_WIFI_STATE”

What i’ve been missed out ?


#2

Which Cordova version are you using? Type ionic info and copy & paste its output here.


#3

If you are using Cordova 5 you need to install this plugin https://github.com/apache/cordova-plugin-whitelist

And add a whitelist in your config.xml file.


#4

Your system information:

OS: Windows 8.1
Node Version: v0.12.2
Cordova CLI: 5.0.0
Ionic CLI Version: 1.3.20


#5

My cordova version 5
After install plugin https://github.com/apache/cordova-plugin-whitelist and update config.xml, now my apps running well.

Thanks to All


#6

Hi @grillorafael / @sithot28,
How i am also facing same issue. Please help me as I am new. I am not getting how can i install the plugin https://github.com/apache/cordova-plugin-whitelist


#7

Just type ionic plugin add cordova-plugin-whitelist.

I’ve actually just submitted a pull request asking to include that plugin by default when creating a new project with ionic start.


#8

Hi, thank you all for the tips, my android app is working again, but I’m unable to get it working with appinbrowser and I don’t know how to debug to see what its happening inside.

Any help would be appreciated


#9

cordova-plugin-whitelist worked for me. Thanks