Tag: cordova

PhoneGap error – “Uncaught ReferenceError: cordova is not defined”

I’m trying use the menu button on Android, with the PhoneGap. The problem is that I can’t use it because appear this error on log: “Uncaught ReferenceError: cordova is not defined”. This is the source: <!DOCTYPE html> <html> <head> <!–<script type=”text/javascript” charset=”utf-8″ src=”js/cordova-2.6.0.js”></script>–> <!–<script type=”text/javascript” charset=”utf-8″ src=”cordova-2.6.0.js”></script>–> <!–<script type=”text/javascript” charset=”utf-8″ src=”js/cordova.js”></script>–> <script type=”text/javascript” charset=”utf-8″ src=”cordova.js”></script> […]

Capturing back key press on PhoneGap for Android

I am using PhoneGap for Android Application development and I’m stuck at capturing the back key press on the device! I tried everything from other threads and from the official wiki page but none seem to work! 🙁 I could capture menu and search keys with keyEvent.menuTrigger and keyEvent.searchTrigger but can’t seem to capture the […]

onActivityResult Never gets called Phonegap Cordova

I am using Barcode Scanner Plugin for PhoneGap using ZXing as library project. I have a code which works perfectly on Galaxy Tab 2 (7″). The same code doesn’t work on Galaxy S3. Problem : When ZXing CaptureActivity scans the barcode it just finish the CaptureActivity and Calling activity never comes back with onActivityResult method. […]

“Exception: Error during instantiation of t! Primary outlet already registered.” in cordova angular2 app

I am building an simple cordova app with my project. It has 2 levels of nesting (main route) -> child route -> (another child route). When trying to browse to the 2nd level (another child route) I get an error saying Exception: Error during instantiation of t! Primary outlet already registered. First level works fine. […]

google maps using phonegap in android

I want to display the maps in android using phonegap. I copied the code shown in http://wiki.phonegap.com/w/page/16494764/PhoneGap-Geolocation-Sample-Application. I am using phonegap.0.9.4 and android emulator 2.2. I tested the application in android device. It is every time calling the fail method. Can any one tell me what the problem is or tell me where I can […]

HTML5 Android Phonegap Web app not working offline with cache manifest

I have a simple web app built with Phonegap and Android that call external ressources (js, css, html) from server instead of storing it in Phonegap assets folder. I prefer using external ressources because my server can deliver html pages taking in charge internationalization. This web app work fine on my android device when WIFI […]

Get picture location – Phonegap camera

I used this code: function getPicture(){ navigator.camera.getPicture(onSuccess, onFail, { quality: 50, destinationType: Camera.DestinationType.FILE_URI, sourceType : Camera.PictureSourceType.SAVEDPHOTOALBUM }); } function onSuccess(imageURI) { img_uri = imageURI; alert(img_uri); Plugin.callNativeFunction(nativePluginResultHandler, nativePluginErrorHandler, ‘success’, img_uri); } I want to get a URI like this: “/mnt/sdcard/Pictures…” but the alert gave me a URI like “content://media/external/images/media/3915”. What can I do?

ionic android icon not same original size/ratio

I have created a simple 1024×1024 icon.png under resources/ : Then i run ionic resources and all the icons i need are generated under resources/android/icon/ My config.xml is changed to this: <platform name=”android”> <icon src=”resources/android/icon/drawable-ldpi-icon.png” density=”ldpi”/> <icon src=”resources/android/icon/drawable-mdpi-icon.png” density=”mdpi”/> <icon src=”resources/android/icon/drawable-hdpi-icon.png” density=”hdpi”/> <icon src=”resources/android/icon/drawable-xhdpi-icon.png” density=”xhdpi”/> <icon src=”resources/android/icon/drawable-xxhdpi-icon.png” density=”xxhdpi”/> <icon src=”resources/android/icon/drawable-xxxhdpi-icon.png” density=”xxxhdpi”/> <splash src=”resources/android/splash/drawable-port-ldpi-screen.png” density=”port-ldpi”/> <splash […]

iOS / Android: designing app, all-native or PhoneGap?

In the company I work for, I’m part of a team which will have to focus on mobile apps development (iOS and Android). We are committed to realize our first commercial app, for both iOS and Android, and since the first meetings the team is discussing about which is the better development approach for it, […]

Javascript backbutton event listener overrides the android device back button

I have created Android app using cordova 2.6.0. I have implemented a menu feature in my app using html markups and jQuery which toggles on interacting with device’s menubutton. But I could not figure out to achieve the following requirement, to behave like a native app. Requirement The menu should hide on pressing device’s backbutton […]

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