I used jquery and works now
EDIT: Nope. It works in Phonegap App, but not in .apk. Any help??
What do you mean by
in my Android while I am running the app in the server
Sorry, I mean that I have my app hosted in a server (as a webapp) and when I test the app through my browser, it works.
Also works through Phonegap, but not working when I install the .apk :-(
Still not clear, what do you mean by "Also works through Phonegap"? While testing on the Phonegap Developer app?
Are you using plugins?
When you test on the Phonegap Developer app it includes all the plugins, but in your .apk you have to install them in the config.xml
Also, do you have a Content-Security-Policy meta tag in your index.html? Phonegap Developer App uses it's own tag, so if you have one it might not work the same way, so if you have one, share it on the question.
Hi! Yes, I mean on the Phonegap Developer app.
I don't know about plugins... and I don't have a Content-Security-Policy in my index.html. How can I install all plugins and CSP?
The plugins should be on the config.xml, check them there, and if you are using some of them and you don't see them on the config.xml then run phonegap plugin add cordova-plugin-xxxxxx, where xxxxx is the name of the plugin.
The Content-Security-Policy tag is not mandatory, it can cause problems if it's not correctly configured, but if you don't have it, then don't worry about it.
Finnally works!! I added some plugin on the config.xml and a correct CSP tag in my index.html and it works now.
Thank you for your help!