cordova-plugins

Can't add module dependency to CordovaLib for Cordova project using Android Studio

冷暖自知 提交于 2019-12-10 14:32:54
问题 I can't workout how to add the CordovaLib directory as a module dependency in Android Studio. (NOTE: this is the first time I've ever used Android Studio, so possibly I just don't know what I'm doing) I'm using: OSX Yosemite Android Studio 1.1.0 Cordova 4.3 Here are the steps I have taken: Create new cordova project Add android platform and some cordova plugins Import the generated project into Android Studio (NOTE: when it asks about the gradle wrapper, I say no and just point it to where I

Installing Plugins to Visual Studio Cordova project

二次信任 提交于 2019-12-10 13:36:45
问题 I have a new blank cordova project that I would like to install a plugin into, http://plugreg.com/plugin/EddyVerbruggen/LaunchMyApp-PhoneGap-Plugin I've tried the following, open up cmd browse to application folder, containing .sln file install cordova using npm run 'cordova plugin add https://github.com/EddyVerbruggen/LaunchMyApp-PhoneGap-Plugin.git' I receive the following error, 'Current working directory is not a Cordova-based project.' Any idea how I get this to work, assuming that I can

Ionic: Media plugin - can’t get it working

旧城冷巷雨未停 提交于 2019-12-10 13:35:02
问题 This had been working in an old version of ionic but now I've finished updating the rest of this app and gone back to finalise this the sound won't play. I have an on-off switch for playing a demo sound in the app. Here is the code, with comments and with the commented out part I thought might be causing my problem. It isn't. .controller( 'SoundCtrl', function( $scope, $timeout ) { $scope.sound_on = false; var media = new Media( '100bpm.wav' ); $scope.soundPlayer = function() { console.log(

Cordova Connection to server was Unsuccessful

瘦欲@ 提交于 2019-12-10 12:59:53
问题 The Connection to the server was unsuccessful(file:///android-asset/www/index.html) is showing when i run my android application. please let me know how to resolve this issue. 回答1: For latest Cordova (4+) this a setting in config.xml : e.g. <preference name="LoadUrlTimeoutValue" value="70000"/> Increases default timeout to 70 seconds (default is 20), reducing the chance of timing out. Docs: https://cordova.apache.org/docs/en/latest/config_ref/index.html#preference When loading a page, the

Ionic iOS App Error - Custom Scheme URIs are not allowed for 'WEB' client type

亡梦爱人 提交于 2019-12-10 12:43:54
问题 I am using this plugin. https://github.com/EddyVerbruggen/cordova-plugin-googleplus The implementation works fine for android. But google sign in on iOS opens safari webview and throws 400 invalid_request. I am using the ios client id and reverse client id generated on google developer console. Anyways to debug or know what the issue is? 回答1: The usual cause of this error is having an incorrect REVERSE_CLIENT_ID. Double check that you have the REVERSE_CLIENT_ID from the plist file downloaded

How to get FileEntry object while using Cordova Simulate

一笑奈何 提交于 2019-12-10 12:39:13
问题 I'm trying to follow the Take a picture and get a FileEntry Object example for the Cordova Camera Plugin. I'm using Cordova Simulate in Visual Studio 2017 to test the example by selecting "Simulate In Browser" Taking a picture works and the image is shown in the simulator, using the same imageUrl that is passed to the Cordova Files Plugin in this code snippet: function cameraSuccess(imageUri) { window.resolveLocalFileSystemURL(imageUri, function () { console.log('success') }, function (error)

ionic not rendering google maps on first load

泄露秘密 提交于 2019-12-10 12:15:10
问题 I have an app that is a welcome/sign in screen and after you sign it you are taken to a tab screen with four tabs in it, the first tab of which shows a google map. Upon first sign in the page does not display it's self but upon refresh of the page the map show's up gracefully as it was expected to do the first time. This happens EVERY time but I only get one javascript error. error Uncaught Error: can't load XRegExp twice in the same frame(anonymous function) @ xregexp-min.js:2 code function

InApp purchases with cordova

删除回忆录丶 提交于 2019-12-10 12:13:58
问题 I struggle with the inapp purchases with cordova. I'm searching a good tutorial for in app purchases with cordova. Did somebody successful implemented in app purchases with cordova? If so, do you know about a tutorial or example? I've tried many different plugins. Any help much appreciated! 回答1: There are a lot of tutorials around to get you started: https://software.intel.com/en-us/xdk/docs/html5-hybrid-apps-with-cordova-and-in-app-purchase http://www.html5gamedevs.com/topic/12570-in-app

Ionic 4 missing buttons on select dropdown element in InAppBrowser

爷,独闯天下 提交于 2019-12-10 12:04:43
问题 Opening a page with the cordova-plugin-inappbrowser and opening a dropdown/select list, I get the list, but without any confirm or cancel buttons displayed. I do get these outside of the inAppBrowser, in my normal app. This answer does not solve my question, because the element is inside the inAppBrowser, I think: https://stackoverflow.com/a/41203014/10005883 Now I can't close the select / dropdown element, unless I "click" something on the page containing this element. Is there any way to

Ionic 4 native http POST with multiple headers

廉价感情. 提交于 2019-12-10 11:46:03
问题 Here is how I am doing an http post from my Ionic app: import { HTTP } from '@ionic-native/http/ngx'; someAction(assetId: number, userId: number) { var asset: Asset = new Asset(); asset.assetId = assetId.toString(); asset.userId = userId.toString(); const options = { headers: "Content-Type: application/json; charset=utf-8" }; return this.http.post(this.url + "someAction", asset, options).then(data => { return "Done"; }).catch(err => { console.log(err); }); } According to the documentation