FAQ Database Discussion Community


Get controller value in app.js from controller.js

angularjs,cordova,ionic-framework,phonegap-build
Can anyone help me to pass the variable $scope.imageRepoUrl from controller.js to app.js controller.js .controller('deallistCtrl', ['$scope','deals', function($scope, deals) { $scope.title = "test"; $scope.deals = deals.payload; $scope.imageRepoUrl=$scope.$parent.imageRepoUrl; $scope.appWebUrl=$scope.$parent.appWebUrl; }]) app.js .state('app.deallists', { url: "/deallists", views: { 'menuContent': { templateUrl: "templates/deallists.html", controller: 'deallistCtrl', resolve: { deals: ['$http', function($http){ return...

Cordova app local storage remains after app re-installed

cordova,ionic-framework,phonegap-build,cordova-cli
My cordova app has a login (username/password) that once authenticated creates a file called stk.db within the root of the app's file system. When I uninstall the app & re-install it, I am automatically logged in with the previous account I logged in with (due to the stk.db file being...

Running a jquery function from JS

javascript,jquery,cordova,phonegap-build
Sorry for the noobish question, but nothing works for me today. I'm creating a Phonegap application and have intergrated PushWoosh API into my app. And on receive push notification I want to run my previous functions again, so the data will be updated. Pushwoosh has JS function like this: document.addEventListener('push-notification',...

Distinguish an apk build with Cordova/Phonegap from a native one

android,cordova,phonegap-plugins,phonegap-build
I've been having some issues playing radio streams with MediaPlayer in a particular case. But that's not the point, the point is that I found an app that does exactly what I can't do, and I'm suspecting that is because It's using the Cordova / Phongap media plugin. My question...

Has anyone faced Geolocation permission alert for iOS showing twice issue along with bundle location?

ios,cordova,ipad,geolocation,phonegap-build
Geolocation permission alert for iOS showing twice along with bundle location . I have tried by installing latest plugin and other similar answers provided for this Even used below key in info.plist "NSLocationAlwaysUsageDescription" But still I m getting below error: "private/var/mobile/Containers/Bundle/Application/0846B1D6-02AB-4846-ACD2-F722214B9015/myapp.app/www/index.html" in iOS phone gap project. Can any one suggest...

ipad: app cannot be installed at this time

ios,cordova,certificate,phonegap-build
I am completely new to iOS app development process and I have issues with the installation on the actual device. Yesterday or the day before I made the first certificate and a provisioning profile which only contains the UUID of our development iPhone. I uploaded the certificate along with the...

Phonegap inline video not working, with correct settings

ios,cordova,html5-video,phonegap-build
I want to have an inline video of my video hosted on a S3 bucket. I use a HTML video tag to achieve this and have changed the following settings, in defaults.xml <!-- Preferences for iOS --> <preference name="AllowInlineMediaPlayback" value="true" /> If I build my Iphone app the config.xml file...

File(Transfer) with PhoneGap Build is not working

cordova,phonegap-plugins,ionic,phonegap-build,ionic-view
Since I could not find the answer anywhere else in related questions, I'm posting a new question. The problem is: when I run my Ionic app via IonicView (useful app to test your application on your device) everything works fine, but when I run my Ionic app after building with...

Trouble implementing inappbrowser with PhoneGap Build

phonegap-plugins,phonegap-build
I am working on a web app, and am building it with HTML, CSS and Javascript. I am not using PhoneGap, but am using PhoneGap Build to compile my app. I have added <gap:plugin name="org.apache.cordova.inappbrowser" version="0.5.2" /> as seen here to my config.xml file However, I cannot get the plugin...

Blank screen on Android 5

android,cordova,phonegap-build,angular-touch
While developing an app wich uses phonegap, angular touch and jquery we stumble in this bug on some android devices. When touch and move over an non scrollable object the screen goes blank. When scrooling the body the screen comes back to life. All the elements stays in dom and...

Cordova build returns missing plugin.xml

android,cordova,phonegap-plugins,phonegap-build,cordova-plugins
When i build my cordova project i get an warning message as Missing file: /home/vijay/workspace/Repos_temp/QuickTraq_Android/plugins/nl.x-services.plugins.toast/plugin.xml Missing file: /home/vijay/workspace/Repos_temp/QuickTraq_Android/plugins/cordova-plugin-device-rotation-vector/plugin.xml This happens when i add an plugin or remove an plugin also . This happens just as a warning when i add a plugin or build the project but when i remove...

Take rapid fire or continous pictures using phonegap camera api

cordova,phonegap-plugins,phonegap-build
I came across several answers for using camera api in phone gap. However, I cannot find the one that will help to take a continuous picture or rapid fire pictures using phone gap camera api. Is there a way to achieve it?

cordova script src takes relative path rather absolute

javascript,cordova,phonegap-build,hybrid-mobile-app,cordova-cli
I am building a hybrid app out of cordova . my folder structure looks like www bower_components components fonts scripts styles images index.html When i build the project using cordova (cordova build) and when i run cordova serve the javascripts files are served from root path Javascript takes from relative...

Error: ENOENT, no such file or directory - PhoneGap

android,cordova,phonegap-plugins,phonegap-build
Once the phonegap installation is done, I created a phonegap project and try to build it. I get below error. [email protected]:~/phonegap/testapp$ cordova build cp: no such file or directory: /home/username/phonegap/testapp/icon.png Running command: /home/username/phonegap/testapp/platforms/android/cordova/build /home/username/phonegap/testapp/platforms/android/cordova/node_modules/q/q.js:126 throw e; ^ Error: ENOENT, no such file or directory '/home/username/android-sdk-linux/tools/tools/lib/build.template' at Object.fs.openSync...

how to use localstorage for login using javascript

javascript,jquery,cordova,phonegap-build
I'd written a code for login using javascript function checkLogin() { if(localStorage.login=="true") { window.location.href = "index.html"; } else if(localStorage.login=="false") { window.location.href = "login.html"; } } where localStorage.login="true" & "false" has been assigned from server dynamically The page get looply redirected when i include this code!! Give me solutions for :...

How to add Google ads to PhoneGap built apps?

android,ios,cordova,ads,phonegap-build
I have this simple puzzle game that I had developed in JavaScript a while back. I heard about PhoneGap just very recently and thought maybe I could convert it into a native looking app for the Android and the iOS. It turns out that it's quite simple! This brings me...

Phone Gap and Web Services

java,javascript,web-services,cordova,phonegap-build
I'm trying to use PhoneGap to package the front-end of my application. This application makes REST calls to the back-end from javascript. I'm using PhoneGap Build for the build process. I have white-listed all domains in my config.xml file like so: <access origin="*" />. When testing the app on a...

Disable home and back buttons

android,phonegap-build
I'm coding an app under phonegap (more specific in android tablet) How can I disable the home, menu and back buttons in the screen?

Json inside App Phonegap ! What is the Path?

javascript,android,json,cordova,phonegap-build
I have some issue about my Phonegap App! When I test inside my browser all works Well ! But when I compile to apk... In my phone doesn't find the JSON... I'm new in programming , sorry about my bad english too... What Can I do ? var number =...

Cordova 5: making changes only to android platform

android,cordova,phonegap-build
I have a Cordova 5.0 project and would like to make some CSS and HTML changes that take affect only on Android. I've tried to make changes to items in the /www_assets but as soon as I run the command $cordova --HDPI --nobuild the files get updated back to the...

Jquery Mobile + Phonegap improve listview performance

performance,cordova,jquery-mobile,phonegap-build
In my JQM 1.4 + Phonegap 3.6 app, I am using a listview as in the following code. HTML: <div id="boardselection"> <ul id="modelsListview" data-role="listview" data-icon="false"> </ul> </div> JS: function resetModelsListView(prodata, firsttime, funfeatureOn, specificBrand, specificPro) { console.log("on passe dans resetModelsListView"); // funfeatureOn = 0; //debug timer var time = []; var...

Android hide image from user gallery

android,web,gallery,phonegap-build,file-transfer
i'm using the following phonegap build plugin: com.chanthu.evri.gcs-file-transfer version="1.0.0" to download images on devices. The download is ok but the images are visible in user's standard gallery myApp folder. How can i save the images without creating such a gallery ? The path I use to save them is: cdvfile://localhost/persistent/myApp/...

splash screen not come when in build from cloud phonegap. form eclipse i run in emulator its work prefect

android,cordova,cloud,phonegap-plugins,phonegap-build
i build phonegap project with help of CLI. and i import that in eclipse. add plugin of splash screen. prefect work in emulator. Then after i want that apps in ios and windows. so for that i go for cloud of phonegap. i upload eclipse code. but splash screen not...

Change application direction using Phonegap or SAPUI5

html,cordova,phonegap-plugins,phonegap-build,sapui5
I am not able to change my app direction using (html dir="ltr"), after android device language has been changed to arabic. How can I change my app direction to ltr using phonegap or sapui5?

Different performance with Intel XDK

cordova,jquery-mobile,phonegap-build,intel-xdk
I use Intel XDK to develop apps with HTML and Cordova. I use jQuery Mobile. My question is: Why if I debug app with XDK and an Android device I have a very good performance, and if I compile app into an .apk, same code works very very slow? Thanks...

PhoneGap : Fetch Contact list with optimize speed

android,cordova,phonegap-plugins,phonegap-build
In Phonegap I try to fetch the contact list from phone.I need just name and phone number , its taking around 40 seconds to fetch all the result.I add the plugin in config.xml .In my phone I have around only 400 contacts. But when I alert the length of contact...

Phonegap : Custom font is not working

android,css,cordova,font-face,phonegap-build
I am doing an application in PhoneGap using custom font style. The font style is taking in browser , but not taking in Android phone. <style> @font-face { font-family: 'CooperStd'; src: url('fonts/cooperblackstd.eot'); src: url('fonts/cooperblackstd.eot?#iefix') format('embedded-opentype'), url('fonts/cooperblackstd.woff') format('woff'), url('fonts/cooperblackstd.ttf') format('truetype'), url('fonts/cooperblackstd.svg#CooperBlackStd') format('svg'); font-weight: 900; font-style: normal; } body{font-family:'CooperStd' , arial ;...

Error: cordova platform add android

android,cordova,npm,phonegap-build
I'm using command line for PhoneGap and after that I created the project I want to add platform. When I digit this: cordova platform add android, I have this error: > npm http GET https://registry.npmjs.org/cordova-android/3.7.1 > TypeError: Request path contains unescaped characters. > at new ClientRequest (_http_client.js:73:11) > at TunnelingAgent.exports.request...

PhoneGap relative protocol issues

javascript,android,cordova,phonegap-build
I have some Javascript for an API (SoundCloud) which I load into my PhoneGap app remotely and there are obvious issues with any asset that uses a relative protocol as PhoneGap will be using file:// So for any assets pointing to a relative protocol such as //foo.bar/api.js the PhoneGap app...

Phonegap build, enable secondary portrait orientation?

orientation,phonegap-build
Phonegap build by default apparently excludes rotation to secondary portrait orientation. Is it possible to enable it? Using PhoneGap build service and iPad....

Is Cordova.js Necessary?

cordova,phonegap-build
If we do not need access to the device's camera, contacts, GPS, etc, is there any reason not to eliminate the cordova.js file? Maybe it would improve loading time. I successfully built and previewed the app commenting out its script tag and it seems to work fine, but maybe there...

Cordova build : Error :Failed to run “java -version ”

cordova,phonegap-plugins,phonegap-build
I've installed the latest Apple update for Java, here is what the terminal now says: $ java -version java version "1.8.0.0_25" Java(TM) SE Runtime Environment (build 1.8.0.0_25-b18) Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode) After that I still have the following result: $ cordova build Running command... [Error:...

Ionic Android Build Failed

android,cordova,ionic-framework,phonegap-build,hybrid-mobile-app
I am starting out in hybrid development and I chose cordova and ionic to start off. I am following the ionic documentation. However after creating a new ionic project and adding android as a platform, I repeatedly fail while trying to build the android platform. I've been trying to solve...

How to get all contacts from Contact plugin in phonegap

cordova,phonegap-plugins,phonegap-build
I'm using Contact plugin in phonegap by following code var options = new ContactFindOptions(); var options = { multiple:true } options.multiple = true; var fields = ["displayName","phoneNumbers"]; navigator.contacts.find(fields, onSuccessContact, onErrorContact, options); Here, im getting the contacts who are displayName is null. I dont want this type of filter. I want...

why some css codes doesnt work on android 4 or less?

android,html,css,cordova,phonegap-build
I am using phonegap to mobile application this simple code was used to give the background an effect background:radial-gradient(#f2f2f2,#8d8d8d); it works fine in the browser and on android 5 but when i tested it on a 4.0.3 device, it didnt works at all along with some other css codes. why...

Cordova/Phonegap not launches the application in the emulator

android,cordova,ubuntu-14.04,phonegap-build
After running cordova run android and build the application, open the emulator but never load the application. In the terminal returns LAUNCH SUCCESS but it's not true. What's the problem? Ubuntu 14.04 LTS 64 bit Cordova 5.0.0 Phonegap 5.0.0-0.27.1 Apache Ant(TM) version 1.9.3...

How to convert camera uri to blob object in Phonegap?

android,cordova,jquery-mobile,phonegap-plugins,phonegap-build
In my application, camera image save and retrieve from SQLite. I have camera uri from phonegap api but i want to convert camera uri to blob object and base64 string. I found some of the solution from online but i can't solve my problem. This is convert Base 64 to...

PhoneGap Build: icons and splashscreens are not displayed correctly

android,ios,cordova,phonegap-build
I have the problem that android and ios icons are not included correctly when I build the app with Phonegap Build. The config.xml part is as follows: <icon src="www/res/icon/icon.png" /> <splash src="www/res/screen/splash.jpg" /> <platform name="android"> <icon src="www/res/icon/android/icon-ldpi.png" density="ldpi" /> <icon src="www/res/icon/android/icon-mdpi.png" density="mdpi" /> <icon src="www/res/icon/android/icon-hdpi.png" density="hdpi" /> <icon src="www/res/icon/android/icon-xhdpi.png"...

Build full-featured iOS application with just PhoneGap Build and no Mac-like hardware [duplicate]

ios,cordova,phonegap-build,appstore-approval
This question already has an answer here: PhoneGap, PhoneGap Build and iOS - Mac needed? 1 answer Since paying $99 for Apple Developer Program is a bit tough decision for me (especially, if it would be a wasted money), then the question is quite simple: Can I build full-featured...

Phonegap and WebWorkers

cordova,phonegap-build,web-worker
I am trying to write a PhoneGap/Cordova app. I am trying to do some of the more long running background stuff in Web Workers. However I am finding that some of the functionality is not available from within the Web Workers. navigator.connection is available from within the main script but...

Phonegap scrolling issues on android 5

javascript,css,cordova,android-5.0-lollipop,phonegap-build
We are developing an app using Phonegap/Javascript. Scrolling used to work fine, until we tried the new Android 5. The page does not scroll down, unless you swipe many times. Then it is stuck in the other position.. Can't find anyone with this problem! We are using just simple divs...

Why jQuery.cookie plugin returns “[object Object]”

javascript,php,jquery,cookies,phonegap-build
I'm using the plugin jQuery.cookie by carhartl on my phonegap build project. However when I try to create a cookie and then read it, it return a null value : [object Object]. Here is the code : $(".validator").click(function(){ $.ajax({ type: "POST", url: "http://path/to/adduser.php", data: dataString, cache: false, success: function(result){ $.cookie('name',...

Using “this” object inside click event handler

jquery,cordova,phonegap-build
I am writing PhoneGap application. I compile it using the PhoneGap Build web service. I have not included jQuery Mobile, though I have included jQuery in my project. In a pure web application I often use code like this: <html> <body> <div class="button" id="button1">Hello</div> <script> $(".button").click(function() { alert($(this).attr("id")); }); </script>...

Phonegap compass plugin not working

android,cordova,phonegap-plugins,phonegap-build
I am trying to get a compass function working on my app with no success. Judging by the errors I am inclined to think that the plugin is not being added or the device is not ready. But as far as I can tell I have done both things. I...

Ionic, Phonegap, AngularJs : local storage undefined key when emulating

angularjs,cordova,local-storage,phonegap-build,ionic
I just built a simple application calling a rest api built with symfony and secured with fos_oauth. I have a AuthService that return an access token that allow my mobile application to access to my api. It is stored in local storage : On my browser using ionic serve (similar...

How do I open all links from an external page using InAppBrowser?

javascript,hyperlink,external,phonegap-build,inappbrowser
I have searched the web, youtube, and communities but no solution to this question. I have an app that I am developing using Phonegap Build. I have included the InAppBrowser plugin in my config.xml and works fine with links in the app. The solution or direction I am looking for...

how to open a url from the barcode scanner in phonegap build

phonegap-build,barcode-scanner
i'am using the Barcode Scanner for phonegap build, How would i retrieve the QR Codes URL data and display the webpage into a Iframe or div $(document).ready(function(e) { $("#scanner_mode").click(function() { cordova.plugins.barcodeScanner.scan( function (result) { alert("We got a barcode\n" + "Result: " + result.text + "\n" + "Format: " + result.format...

Cordova / Ionic : $http request not processing while emulating or running on device

angularjs,cordova,phonegap-build,ionic
Everything were going well last week and while i was running the application on device or emulating with Genymotion, all the calls to the api were working (Either returning the data or failing but at least showing something). I was using ionic run android I add to update the global...

Meteor: disable hot code push

javascript,cordova,meteor,phonegap-build
I'm developing a phonegap app and hot code push is causing a problem for some of my users (after push, app hangs and users have to re-install the new app). I'd like to disable hot code pushes and found the following snippet but am getting the error, "TypeError: Cannot call...

Visual Studio - Cordova App - Buildproblem

android,visual-studio,cordova,phonegap-build,visual-studio-cordova
I want to start with a new blank cordova app in visual studio. I´ve created a new project. Now I want to build the generated project and I get the following error. Diagnostic output: ... CopyToOutputDirectory=Never DestinationRelativePath=C:\Users\Admin\Documents\Raumvisualisierung\Raumvisualisierung\\www\scripts\appBundle.js.map Die Erstellung des Ziels "PreComputeCompileTypeScript" im Projekt "Raumvisualisierung.jsproj" ist abgeschlossen.: (Ziel-ID:18) Ziel "CompileTypeScript:...

How to access network location using phonegap

cordova,phonegap-build
I am new to phonegap. How can I access location that is provided by the service provider in phone (without using the GPS),the default location shows in phone. I need to collect to the location and store it when needed. If possible this , Its helps me when shows the...

Phonegap Build .ajax request returning 404

android,cordova,phonegap-plugins,phonegap-build
I'm working on a Phonegap app which is built using the Adobe Phonegap Build service. It currently uses Phonegap 3.7.0. All requests made via jQuery .ajax method are returning a 404. When I submit the same request via a web browser it completes successfully. I've seen the post (Phonegap Cordova...

Phonegap Android permissions

android,cordova,phonegap-build,android-permissions
I have a Phonegap app that I'm currently developing and testing for Android. Problem is, when I publish to device, the Android Manifest is full of permission requests that I did not ask for. I tried adding: <preference name="permissions" value="none" /> to config.xml but it still doesn't work. How can...

How to integrate Rails with PhoneGap?

javascript,cordova,ruby-on-rails-4,phonegap-build
I've been looking at PhoneGap recently and I would like to use it for one of my projects, but I'm a little confused as to how it works. It says you can use HTML, CSS and JavaScript. But what can I use for the backend? What I want to make...

PhoneGap / Cordova: Upload only new images with camera

cordova,phonegap-build
I am building an application that will require the user to take a photo and upload it to the server. The user may not access their camera roll and the photo must not save to the camera roll. I cannot find any documentation on this. Is it possible?...

Cordova Build Error for Android

cordova,phonegap-build,cordova-cli
I have been running through the Cordova tutorial for installation and creating a first app. After spending the last few hours trying to figure this out I have pretty much reached a dead end. I'm currently running Ubuntu and trying to build on Android 4.0.0. I have all of the...

Launch Google Play Games App using WEBINTENT plugin

android,facebook,cordova,phonegap-build,webintents
I want to open Google play games app on my mobile from my android phonegap build application using WEBINTENT plugin. window.plugins.webintent.startActivity({ action: window.plugins.webintent.ACTION_VIEW, url: 'facebook://' }, function() {alert('success')}, function(errorMsg) {alert('Failed to startActivity errorMsg=' + errorMsg)} ); },false); This code works well to open facebook. How to use it to open...

no apk file exist phonegap project

java,android,cordova,ant,phonegap-build
im building simple project with phonegape using cli i created the project folder successfully but when i build it using build command or build release it show me and there is no bin folder or any apk files i tried build android --release and it is not working i installed...

Play Store - Problems adding apk to the market

android,cordova,google-play,phonegap-build,phonegap-desktop-app
I used PhoneGap to create my application Now I made a key.keystore and uploaded it to phonegap site as shown here http://docs.build.phonegap.com/en_US/signing_signing-android.md.html Now I downloaded app-release.apk and decompiled it using apk studio program to remove some permissions and recompiled it again. The problem when I try to upload app-release.apk to...

ionic build android failure - Execution failed for task processDebugResources

android,cordova,ionic-framework,phonegap-build
I am using Mac Yosemite. Getting the following failure on running a build for android platform : FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':processDebugResources'. > com.android.ide.common.internal.LoggedErrorException: Failed to run command: /Users/sairamk/Development/android-sdk-macosx/build-tools/22.0.1/aapt package -f --no-crunch -I /Users/sairamk/Development/android-sdk-macosx/platforms/android-22/android.jar -M...