ngcordova

Uploading video to Firebase uing ngCordova ($cordovaCapture) in ionic framework

巧了我就是萌 提交于 2019-12-06 11:50:18
问题 How to upload video that I record using my mobile. I manage to upload the video path to Firebase but when I want to use it in my view (html file), it does not work. Here is my code: .controller("HomeCtrl", function($scope, $firebaseArray, $cordovaCamera, $location, $cordovaCapture){ var fb = new Firebase("https://myURL.firebaseio.com/videos"); $scope.videos; $scope.record = function(){ fb = new Firebase("https://myURL.firebaseio.com/videos"); $scope.videos = $firebaseArray(fb); var options =

Ionic: Opening html content in Inapp Browser

一个人想着一个人 提交于 2019-12-06 05:37:44
I'm trying to integrate payment gateway in an Ionic mobile app. I get the HTML code from the server which contains a form with all the post parameters and submit on page load to call the payment gateway. How can I open the in-app browser with the HTML content? After the transaction, the payment gateway will call the server URL & process the response. How can I now communicate back to Ionic app to close In-app browser & show the response? Check out the exceuteScript Api of the Cordova In-App-Browser plugin. You should be able to Add the required HTML to an empty document Poll the document

cordova.js causes reference error 'require is not defined'

雨燕双飞 提交于 2019-12-05 22:15:29
I'm wish to use ngCordova to detect the network state of a device. However, as soon as I include cordova.js I get an error - Uncaught ReferenceError: require is not defined (cordova.js:23) I've installed and am successfully running Node.js and Cordova , and I've downloaded and installed ngCordova following the instructions here . I have also installed the network-information plugin via the Cordova CLI - cordova plugin add cordova-plugin-network-information As per the documentation this is the code sample that I'm using (and to clarify, the error occurs as soon as I include cordova.js, so even

How to programmatically enable and disable GPS in Ionic Framework or Cordova

喜欢而已 提交于 2019-12-05 16:15:41
My problem is simple. I need a way to turn on and off GPS using a button inside an Ionic app. I've check the docs and read this ng-cordova plugin http://ngcordova.com/docs/plugins/geolocation/ but they don't seem have this funcction. Am I just missing something or is this even possible in Ionic Framework? Thanks! As far as I'm aware there isn't the ability to directly disable GPS from your app. If you are trying to allow the user to disable GPS, I achieved this by adding a setting to localStorage that the user can change on the settings page in my app. Every time I check for GPS in my location

Errors using the ngCordova $cordovaSQLite plugin with Ionic

醉酒当歌 提交于 2019-12-05 09:06:42
问题 I am currently trying to implement the ngCordova SQLite plugin with my app but have yet to produce a working solution. I have followed Nic Raboy's blog post on how to implement the SQLite plugin with your Ionic project to a "T," but I am still receiving the error: Error: undefined is not an object (evaluating '$window.sqlitePlugin.openDatabase') when I try to run the application in the iOS emulator. I have also verified that ngCordova and the plugin have been loaded into my project. This is

Uploading video to Firebase uing ngCordova ($cordovaCapture) in ionic framework

余生长醉 提交于 2019-12-04 17:59:48
How to upload video that I record using my mobile. I manage to upload the video path to Firebase but when I want to use it in my view (html file), it does not work. Here is my code: .controller("HomeCtrl", function($scope, $firebaseArray, $cordovaCamera, $location, $cordovaCapture){ var fb = new Firebase("https://myURL.firebaseio.com/videos"); $scope.videos; $scope.record = function(){ fb = new Firebase("https://myURL.firebaseio.com/videos"); $scope.videos = $firebaseArray(fb); var options = { limit: 1, duration: 15 }; $cordovaCapture.captureVideo(options).then( function(videoData) { var i,

Timeout about geolocation always reached when position mode is set to “Device only”

Deadly 提交于 2019-12-04 15:12:30
I own a Ionic application (Cordova). I have this JS code aiming to get the position of the Android's device: $cordovaGeolocation.getCurrentPosition({ enableHighAccuracy: true, timeout: 15000 }) $cordovaGeolocation comes from ng-cordova lib. I successfully checked that the plugin org.apache.cordova.geolocation is updated with the last current version. Some users complain about more 15 seconds for the first query! Note that the timeout is set to 15000 ms => 15 seconds. Meaning that the device did not succeed to establish the position. After investigating, I figured out the issue: those users had

Errors using the ngCordova $cordovaSQLite plugin with Ionic

怎甘沉沦 提交于 2019-12-03 21:17:51
I am currently trying to implement the ngCordova SQLite plugin with my app but have yet to produce a working solution. I have followed Nic Raboy's blog post on how to implement the SQLite plugin with your Ionic project to a "T," but I am still receiving the error: Error: undefined is not an object (evaluating '$window.sqlitePlugin.openDatabase') when I try to run the application in the iOS emulator. I have also verified that ngCordova and the plugin have been loaded into my project. This is the order of how my scripts are getting loaded into my project: <script src="lib/ionic/js/ionic.bundle

cordova build error Exit code 1

夙愿已清 提交于 2019-12-01 14:48:42
I have created referred - https://cordova.apache.org/docs/en/latest/guide/cli/index.html#installing-the-cordova-cli for creating first cordova android app. I was able t create project and add android platform, but could not build cordova, following error appeared. Following is the commands executed from command prompt It looks more of a network issue. The gradle download will fail if you are using restricted proxy network. In case of network restrictions, you can work around this issue by following the steps below: 1) Download the required gradle version zip file from gradle distribution link

cordova build error Exit code 1

不羁岁月 提交于 2019-12-01 13:29:02
问题 I have created referred - https://cordova.apache.org/docs/en/latest/guide/cli/index.html#installing-the-cordova-cli for creating first cordova android app. I was able t create project and add android platform, but could not build cordova, following error appeared. Following is the commands executed from command prompt 回答1: It looks more of a network issue. The gradle download will fail if you are using restricted proxy network. In case of network restrictions, you can work around this issue