cordova - Ajax error load Url from remote server in phonegap -
i have been develop phonegap android app. put folder www in remote server, , in mainactivity(droidgap) loadurl server. had config in phonegap , app running in device ( load , show page server). problem when send request ajax server fail. not connect host. please me? thanh much.
- mainactivity
@override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); super.loadurl("http://172.16.3.198:8080/servermail/index.html"); }
- config.xml
<access origin="*"/> <content src="http://172.16.3.198:8080/servermail/index.html" />
the app not have internet permission. can edit androidmanifest.xml, , below:
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.petro" android:versioncode="1" android:versionname="1.0" > <uses-sdk android:minsdkversion="8" android:targetsdkversion="17" /> <uses-permission android:name="android.permission.internet"/>
Comments
Post a Comment