Reputation: 7384
My ionic app was running fine in the desktop browser and on ios, but not showing up at all on android. It wasn't explicitly failing, but it just resulted in a blank, white screen with no sign of life.
The same result happened both in android emulation and on an actual android device. The app would load, with its icon and everything, but its view was completely blank and empty.
SO has lots of questions about explicit ionic android build errors and platform-irrelevant errors, but nothing that quite matched what I was seeing.
I set up my android device to debug through Chrome Canary on my Mac, and was able to see the javascript console while it ran... looked like it was having trouble loading key data from an external url!
A little research showed me that this is a feature of Android Cordova, not a bug... and that the solution is to add the Whitelist Cordova plugin to ionic, whitelist the domains in question in config.xml, and rerun... that solved the problem!
The bigger mistake was that I was using resolve sections in my ui-router states, but had never thought about what to do if the promises in question never resolve!
Upvotes: 1
Views: 2950
Reputation: 7384
this is a feature of Android Cordova, not a bug... and the solution is to add the Whitelist Cordova plugin to ionic, whitelist the domains in question in config.xml, and rerun.
Upvotes: 1