Phone call for Windows Phone ajax not working

I created the Windows Phone application through the handset, and I deployed to the Windows phone using the application deployment tool, and it works well (all functions, including ajax call). After that I loaded into the Windows storage.

Now the Ajax call does not work when this application is installed from the repository. but it works in deployment. In the config.xml Permissions file :

<preference name="permissions" value="INTERNET" /> 
<preference name="permissions" value="ACCESS_NETWORK_STATE" /> 
<preference name="permissions" value="ACCESS_WIFI_STATE" /> 
<preference name="permissions" value="WRITE_EXTERNAL_STORAGE" /> 
<preference name="permissions" value="READ_PHONE_STATE" />

Plugins

<gap:plugin name="nl.x-services.plugins.socialsharing" version="4.3.8" />
<gap:plugin name="com.indigoway.cordova.whitelist.whitelistplugin" version="1.1.1" />
<gap:plugin name="org.apache.cordova.Device" />

Feautures:

<feature name="http://api.phonegap.com/1.0/network"/>

How can i solve this?

+4
source share
1 answer

I added the code below and finally developed this ayax call in an application that loads from the Windows repository.

$(document).on( "mobileinit", function() {  
  $.support.cors = true;  
  $.mobile.allowCrossDomainPages = true;  
});
+4
source

Source: https://habr.com/ru/post/1621575/


All Articles