Software Archive
Read-only legacy content

Web service is not working on my android device but it can be debugged via App Preview

Ozgur_O_
Beginner
1,662 Views

Hello,

I'm developing a Cordova + HTML5 hybrid app. I have a web service developed on Asp.Net Web Api 2. With this service i can fetch some json data using AngularJS http provider.

I can show the json data using Emulate, Debug (on my phone with Intel App Preview) and any web browser. Nothing's wrong with these platforms.

But when i build my app and then install on my android device, nothing's shown.

Is this problem caused by AngularJS or maybe is it necessary to add my web service url to Domain (white) List section or is the problem caused by something else that i don't know?

 

0 Kudos
9 Replies
Rakshith_K_Intel
Employee
1,662 Views

There is known issue with AJAX and Cordova CLI 4.1.2 on Android version >4.4

Workaround is to change the Cordova CLI version from 4.1.2 to 3.5 in the Intel XDK - > Project Settings -> Build Settings -> Android

0 Kudos
Ozgur_O_
Beginner
1,662 Views

Oh thank you very much for your response Rakshith.

I'll make the change immediatrly.

Cheers.

 

0 Kudos
Ozgur_O_
Beginner
1,662 Views

@Rakshith,

Is there any issue about IOS Build?

 

0 Kudos
Rakshith_K_Intel
Employee
1,662 Views

The iOS build server was down, it has been resolved now, try again.

0 Kudos
Ozgur_O_
Beginner
1,662 Views

Oh i didn't notice that :)

Actually i meant that do i have to make any change building iOS version?

 

0 Kudos
Rakshith_K_Intel
Employee
1,662 Views

no changes required for iOS build, the AJAX issue is for Android only

0 Kudos
Yin__Sandy
Beginner
1,662 Views

Hai,

      I have developed Hybrid app using Jquery and Html5 by using Json Services.and I have build bot andriod and ios app.In android services are working. but in ios webservices are not working.I need configure anything in code ? or i need any plug-ins for this ?

 

0 Kudos
jits_s_
Beginner
1,662 Views

hi, I am facing the same problem. Web service is working fine in web application and in emulator as well. But after making android app, it is not working at all. Let me know the possible solutions..

Thanks,

Jits

0 Kudos
Ozgur_O_
Beginner
1,662 Views

Hi all,

I could run my app with no problem after doing these tasks :

- Updated XDK

- as Rakshith said, I changed the Cordova CLI version from 4.1.2 to 3.5 for android build.

- added my web service url to the white list.

Everything is fine now.

 

Good luck.

0 Kudos
Reply