i try to make my first android app with Phonegap. Everything works well but now i have a problem and could not found a solution. Maybe some of you could help me. My Problem is that i try to call a php file to read some data from a MySQL DB. With localhost i have no problems. But if i try to call a php-file on a server i get the following message in the console: "W/SystemWebViewClient: URL blocked by whitelist: xxx" where xxx is my servername. I found a few similar threads here and checked everything. my config.xml have the "" but it's still not working. There are a few solutions for cordova but i cannot found anything for Phonegap. Maybe some of you have an idea an can help me.
Thanks. Alex
My mistake, you dont need plugin. Simple add following line to config.xml:
<access origin="*" />
which means enable network access to all domains.
You can also set for only specific domain: Whitelist guide
You need to include the cordova-whitelist-plugin
To make PhoneGap add this plugin during build just add to your config.xml
(inside <widget>
tag) next line:
<plugin name="cordova-plugin-whitelist" source="npm"/>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.