I'm trying to build my first android application using Cocoon or PhoneGap. When I test all the links in the browser, external resources (pictures, multimedia, requests to the database, WebSocket) - everything works, but after building in apk no external resources are loaded, despite the fact that when you install the application in the phone (Lenovo A800) The application is requesting permission to access the Internet. I tried to include different plugins from Cordova - it did not help, I tried to change webview on Cocoon webview + or canvas + - it does not help. For simplicity, I made the simplest project - a page with two images, one of which is on the Internet:

http://coockoo.ru/!test/blank/ Apk: http://coockoo.ru/!test/blankapk.zip

Both images are displayed in the browser, and only one is displayed on the device.

  • Most likely, the domains for which requests are made should be added to the [white list] ( cordova.apache.org/docs/en/latest/guide/appdev/whitelist ) - Uranus
  • <! - Added to config.xml -> <access-origin = " " /> <allow-navigation href = " " /> <allow-intent href = "*" /> added to index.html <meta http- equiv = "Content-Security-Policy" content = "default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval" "> did not help - Pavel Dobromyslov
  • Although there are improvements: when you click on the link, you get an error "could not connect to the server." Tried without http: // - - Pavel Dobromyslov
  • It didn't work in build.phonegap.com, but it works in cocoon.io, thanks @Uranus, but WebSocket does not work - Pavel Dobromyslov

0