As I mentioned somewhere in my previous posts, installing whitelist plugin for cordova(5.0+) platforms in now compulsary to get server call working. In config.xml file add below line-
<access origin=”*” subdomains=”true” />
Above will ensure ajax requests happen properly on Android, IOS and Windows phones. But Blackberry10, it needs one more fix. Without adding below line, I was able to make a server call but only OPTIONS request was being received. As soon as the response is received, blackberry browser is blocking the server calls treating it as Cross-Domain request.
<preference name=”websecurity” value=”disable” />
You need to disable websecurity by adding above line to your config.xml file to get it working for Blackerry10. I’ve seen few posts mentioning this should not be used in production but as of now, I could not find any alternative. I’ll update this post shortly if I find anything better.