This is a migrated thread and some comments may be shown as answers.

app works in simulator not on device and ajax call is not working in android devices

6 Answers 133 Views
Android Devices
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Rakesh
Top achievements
Rank 1
Rakesh asked on 14 Dec 2016, 12:49 PM
i am creating an app and thatapp works in simulator not on device and ajax call is not working in android devices

6 Answers, 1 is accepted

Sort by
0
Preslav
Telerik team
answered on 19 Dec 2016, 01:10 PM
Hello Rakesh,

Based on your description, I believe that the Cordova Whitelist Plugin is not included in your project. 

To fix this, you can follow the solution outlined in the AJAX jQuery Request Do Not Work on Android KB article.


Regards,
Preslav
Telerik by Progress
 

Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

 
0
Rakesh
Top achievements
Rank 1
answered on 20 Dec 2016, 05:21 AM

Hi Preslav,

 

First of all thanks for your reply and coming to that problem i already enable the white-list plugins for android

but still ajax calls are are not working in my scenario. Please find the image regarding enabling the white-list plugins for android and android config.xml file.

Please respond fastly.Thank you.

 

Regards,

Rakesh Lankapalli.

 

0
Preslav
Telerik team
answered on 22 Dec 2016, 04:07 PM
Hi Rakesh,

The information provided here is not enough for me to understand why this faulty behavior appears.

You could try capturing the the HTTP/HTTPS traffic of the device with Fiddler by following the steps outlined here and see if there is any information about the failed requests that can help you understand why they don't work.

Regards,
Preslav
Telerik by Progress
 

Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

 
0
Rakesh
Top achievements
Rank 1
answered on 23 Dec 2016, 07:13 AM

Hi Preslav,

 

Please find the attached files regarding complete problem.

Please help me to get rid of the problem.

Thank you once again.

 

Regards,

Rakesh Lankapalli.

0
Preslav
Telerik team
answered on 23 Dec 2016, 02:58 PM
Hello Rakesh,

The provided code looks good to me. I tried to reproduce the issue but I do not have access to the URL provided in the screencast.

Possible causes for this problem might be:
  • A content-security-policy meta tag (usually placed in index.html) that blocks the requests.
  • If you are building in release mode and the URL is signed with a self-signed certificate.
Regards,
Preslav
Telerik by Progress
 

Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

 
0
Rakesh
Top achievements
Rank 1
answered on 03 Jan 2017, 10:09 AM

Hi Preslav,

First of all thanks for your response.

I got the solution for the above from what i am getting till now.

Actually my service is restricted to few device only.

 

Regards,

Rakesh Lankapalli 

 

 

 

Tags
Android Devices
Asked by
Rakesh
Top achievements
Rank 1
Answers by
Preslav
Telerik team
Rakesh
Top achievements
Rank 1
Share this question
or