CORS and phonegap apps

PhoneGap you can just XHR directly to remote servers and it should “just work”. Cross-domain policy does not apply to PhoneGap (for a variety of reasons, basically because your app is essentially running off the file:// URI on-device). Please be aware that you will have to set up a whitelist for your apps to access … Read more

How to use Google Analytics with Phonegap without a plugin?

Check out the video to see it in action: After some research, I found a solution. I came across this thread on the Phonegap Google Group:!msg/phonegap/uqYjTmd4w_E/YD1QPmLSxf4J (thanks TimW and Dan Levine!) In this thread I found that it is possible to use Google Analytics without a plugin. All you have to do is … Read more

Is there a difference between PhoneGap and Cordova commands? I think this url explains what you need. Phonegap is built on Apache Cordova nothing else. You can think of Apache Cordova as the engine that powers PhoneGap. Over time, the PhoneGap distribution may contain additional tools and thats why they differ in command But they do same thing. EDIT: Extra info added as … Read more

“No Content-Security-Policy meta tag found.” error in my phonegap application

After adding the cordova-plugin-whitelist, you must tell your application to allow access all the web-page links or specific links, if you want to keep it specific. You can simply add this to your config.xml, which can be found in your application’s root directory: Recommended in the documentation: <allow-navigation href=”*” /> or: <allow-navigation href=”http://*/*” /> From … Read more

Handling cookies in PhoneGap/Cordova

Friend, I’ve tried too without success to use cookies with phonegap. The solution was use localStorage. Key Quick Example: var keyName = window.localStorage.key(0); Set Item Quick Example: window.localStorage.setItem(“key”, “value”); Get Item Quick Example var value = window.localStorage.getItem(“key”); // value is now equal to “value” Remove Item Quick Example: window.localStorage.removeItem(“key”); Clear Quick Example: window.localStorage.clear(); If you … Read more

Error: Could not find gradle wrapper within Android SDK. Might need to update your Android SDK – Android

Edit 3: Cordova Android 6.2.2 has been released and it’s fully compatible with SDK tools 26.0.x and 25.3.1. Use this version: cordova platform update [email protected] or cordova platform rm android cordova platform add [email protected] Edit 2: There has been another Android SDK tools release (26.0.x) that is not fully compatible with cordova-android 6.2.1. Edit: Cordova … Read more