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

7 posts, 0 answers
  1. Rakesh
    Rakesh avatar
    5 posts
    Member since:
    Nov 2016

    Posted 14 Dec 2016 Link to this post

    i am creating an app and thatapp works in simulator not on device and ajax call is not working in android devices
  2. Preslav
    Admin
    Preslav avatar
    233 posts

    Posted 19 Dec 2016 Link to this post

    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.

     
  3. Rakesh
    Rakesh avatar
    5 posts
    Member since:
    Nov 2016

    Posted 19 Dec 2016 Link to this post

    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.

     

  4. Preslav
    Admin
    Preslav avatar
    233 posts

    Posted 22 Dec 2016 Link to this post

    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.

     
  5. Rakesh
    Rakesh avatar
    5 posts
    Member since:
    Nov 2016

    Posted 23 Dec 2016 in reply to Preslav Link to this post

    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.

  6. Preslav
    Admin
    Preslav avatar
    233 posts

    Posted 23 Dec 2016 Link to this post

    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.

     
  7. Rakesh
    Rakesh avatar
    5 posts
    Member since:
    Nov 2016

    Posted 03 Jan in reply to Preslav Link to this post

    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 

     

     

     

Back to Top