Application can not access URL via Ajax when on android

Asked

Viewed 125 times

0

I’m trying to learn how to use Phonegap Build. I developed a small application with a simple button, which when clicked, will execute the ajax function of jquery. This function will call an external URL and return sucess or error in case of failure. When the project is on my machine, it accesses normal this external URL. But when I go to Phonegaph build, I create the mobile application and install it on Android, then it doesn’t work. I click the button and it returns error, indicated that it could not connect to the external URL using Ajax. But on my machine it accesses. I have found in Google numerous tips to put in config.xml, but so far nothing solved. If someone has already created something with Phonegap Build that can access an external URL, and can give me some suggestion, I would appreciate it.

  • Enter the code, please, and error output.

  • The HTML page: http://pastebin.com/R0SvDf03 My current config.xml file: http://pastebin.com/KsVc8Dsh

  • Pablo, notice that my code is simple. Just an ajax function that calls a URL. As I said, works on PC, but after I turn into android application, returns "error".

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.