How to connect PhoneGap application to internet

筅森魡賤 提交于 2019-12-24 09:59:42

问题


I am coding applications using PhoneGap. In my apps I want to load sources from online using src="url" e.g. pictures, texts or the google reCHAPTA. Testing it in my browser it works perfectly fine but on my smartphone, as an app, the pictures won't load.

Can anyone help me? Do I have to install a plugin? If so, how?

I haven't found any help online yet... :(

<img src="https://www.____.de/___/" alt=""/>

That's all I need, but the picture won't load when compiled into an android application.

No error message...


回答1:


you have to add plugin whitelist

open project parent folder in command prompt and run

cordova plugin add cordova-plugin-whitelist

Hope it helps!



来源:https://stackoverflow.com/questions/56667494/how-to-connect-phonegap-application-to-internet

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!