Tag: cordova

Which is more secure: External browser or ChromeTab for authorization?

I am developing cordova based hybrid mobile apps targeted for android and iOS smartphones. Update: Embedded webview approach is no longer supported by Google Usecase: The application authenticate user and then would be accessing Google Calendar API’s, and finally display user events on the app. Note: I will be Using 3-legged OAuth and Google Data […]

PhoneGap/Cordova Android get screen size after onDeviceReady

Android app returns invalid size (320×480) on onDeviceReady event, but after few seconds size becomes correct. How can we get correct size at the very beginning? Or is there any event on which I can get correct size? I’m using this function to get size: function getWindowSizes() { ┬ávar windowHeight = 0, windowWidth = 0; […]

Installing Phonegap on Windows 7 : The command 'android' failed

I followed the documentation and some tutorials on Phonegap to install it on Windows 7, but I’m stuck. So far, I’ve installed Java 1.7.0_06, Ant-Apache 1.9.2, Eclipse, Android SDK with Android 4.3 (API 18), all Tools and all Extras in the SDK Manager), NodeJS 0.10.18 and Git. I wrote all paths in the PATH variables […]

How to prevent click events on the document body (maybe a bug in Cordova?)

I’m a beginner trying to develop a mobile phone game with with Kinetic Js and “phonegap build”. I am experiencing a problem which I don’t know how to address. I made some tests: I just pasted this code here into my index.html and sent the code to the phonegap build which created the apk file […]

menubutton not working anymore after upgrade to cordova 5+cordova android 4.0.0

I’ve recently upgraded to cordova 5 and removed/recreated android platform in version 4.0.0 and uninstalled/reinstalled all plugins. I also had to upgrade android sdk to sdk 22 instead of 21. Since the update, I’m no more able to catch the menubutton event as described in the cordova documentation. As it’s still referenced in the edge […]

Ajax post not working – Jquery Phonegap Android

Hello everyone and thanx in advance. I am using Phonegap 2.1.0. In whitelist everything is accepted.. **<access uri=”*” subdomains=”true” /> <access origin=”.*” subdomains=”true”/>** I am using this function to call a remote php file from my university web server: var postData = $(this).serialize(); $.ajax({ type: ‘POST’, url: ‘http://–/smartphone/login.php’, dataType : ‘json’, data: postData, success: function(data){ […]

PhoneGap Android get the app version code

I am building a phonegap android app with jQueryMobile. I want to build a function that checks the version code of the application with a webservice in order to suggest to update, if the app is outdated, prompting to the google play store. From my searches, it looks like PhoneGap does not have a method […]

Android installLocation when building with cordova cli

I am building a large cordova/phonegap app using the cordova CLI tools. I need the installLocation in the AndroidManifest.xml file to have the installLocation=”auto” (or preferExternal) setting. I have tried placing <preference name=”android-installLocation” value=”auto” /> in my config.xml file. However, I think that preference might only be valid when building with phonegap, not cordova. Is […]

Phonegap Cross-domain AJAX POST Request not working on Android

Cross-domain AJAX POST request works perfectly fine on web browsers including browsers on mobile phones, but doesn’t work for native applications built using Phonegap I have created a login form that users have to enter their login credentials, then they are verified by the server that is hosted on heroku and returns json {“success”:true} if […]

How to make a custom private plugin in phonegap

Is there any way to achieve this? Everywhere I see contributing to plugin development or making use of an existing plugin (which are public). I would like to make a private plugin. Is this possible? I’m aware that through eclipse (for android) I can do this. But anyway to do this using phonegap build process […]

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.