cordova-plugins

ionic 2 - Error Could not find an installed version of Gradle either in Android Studio

一曲冷凌霜 提交于 2019-11-27 00:01:23
I create ionic 2 project and add diagnostic cordova plugin like this : ionic plugin add cordova.plugins.diagnostic npm install --save @ionic-native/diagnostic and add android platform like this : ionic platform add android@latest but when build with ionic build android console give me this error : Error: Could not find an installed version of Gradle either in Android Studio, or on your system to install the gradle wrapper. Please include gradle in your path, or install Android Studio and I try to download manualy gradle.3.3-all.zip and change this distributionUrl var in platform/android

Unable to delete file using cordova?

三世轮回 提交于 2019-11-26 23:33:37
问题 I am saving my file here : /storage/emulated/0/myApp/helloworld.wav I am trying to delete this file window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, successCallback, errorCallback) function successCallback(fs) { fs.root.getFile('/storage/emulated/0/myApp/helloworld.wav', { create: false }, function(fileEntry) { fileEntry.remove(function() { alert('File removed.'); }, errorCallback); }, errorCallback); } function errorCallback(error) { alert("ERROR: " + error.code) } It does not delete

Cordova list all files from application directory (WWW)

只愿长相守 提交于 2019-11-26 20:25:56
问题 I am using Cordova 4.2.0 with plugins File and media. I have some mp3 files in audio folder inside www directory. I am able to play files through media plugin using path cordova.file.applicationDirectory+"www/audio/01.mp3" and trying to get all available files list using window.resolveLocalFileSystemURL but unable to do so. Please see below code always goes to fail function. window.resolveLocalFileSystemURL(cordova.file.applicationDirectory+'/www/audio', function(dirEntry){ alert('in'); },

How to provide and handle deep links in cordova / phonegap applications

痴心易碎 提交于 2019-11-26 20:16:46
问题 Hi I would like to know of a Cordova / Phonegap plugin or way to expose and handle deep-links in my Sencha Touch / Cordova App So far I am able to deep-link into other applications lets say open Google Play to a specific app detail page. Using this plugin https://github.com/code4jhon/org.apache.cordova.startapp So what I would like to do is enable other applications to open specific views or functionalities in my application. I would like to support Android and IOS. So bottom line is there a

Ionic 2 File Plugin usage examples

寵の児 提交于 2019-11-26 18:18:21
问题 Does anyone have complete examples about how to use the Cordova Native File Plugin in a Ionic 2/Angular 2 project? I installed this plugin but the documentation don't seems to make much sense to me due the fact it is fragmented and lacks of a complete example, including all needed imports. For example, the following example don't shows where objects like LocalFileSystem or window came from. window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function (fs) { console.log('file system open:

Custom Cordova Plugin: Add framework to “Embedded Binaries”

亡梦爱人 提交于 2019-11-26 18:12:34
问题 In a custom Cordova plugin, how can I config a specific .framework file in plugin.xml such that it will be added to the "Embedded Binaries" section in Xcode? If that's not currently possible directly in plugin.xml, I'm open to alternative suggestions. 回答1: I've implemented a workaround until it's supported by Cordova's plugin.xml , hopefully, in the future, once an embed property in such entries will have the same effect: <framework embed="true" src="..." /> , for now, this property does not

Ionic 3 - ios - displaying selected image on screen

回眸只為那壹抹淺笑 提交于 2019-11-26 17:16:53
问题 I set up the camera plugin to select an image from the photo library and upload it to the server with the following code: getImage() { //By default the camera retrieves the image as a JPEG file. const options: CameraOptions = { quality: 100, destinationType: this.camera.DestinationType.FILE_URI, sourceType: this.camera.PictureSourceType.PHOTOLIBRARY, targetWidth:1080, targetHeight:1080, correctOrientation: true, mediaType: this.camera.MediaType.PICTURE, encodingType: this.camera.EncodingType

Cordova error: Using “requireCordovaModule” to load non-cordova module “q” is not supported

醉酒当歌 提交于 2019-11-26 16:38:48
问题 I noticed that the builds on our CI started to fail because of the following error: Discovered plugin "cordova-plugin-app-version" in config.xml. Adding it to the project Installing "cordova-plugin-app-version" for android Adding cordova-plugin-app-version to package.json Using "requireCordovaModule" to load non-cordova module "q" is not supported. Instead, add this module to your dependencies and use regular "require" to load it. [ERROR] Exception: The command '/bin/sh -c ionic cordova

ionic 2 error cordova not available

安稳与你 提交于 2019-11-26 16:12:56
问题 I am trying to use the cordova GooglePlus plugin in a new ionic 2 project (latest ionic2 version) but I always run into errors regarding cordova. The plugin is properly installed and shows up in the plugin folder. One approach I tried is this: import { GooglePlus } from "ionic-native"; and then GooglePlus.login().then(...) The login method executes but always throws an error saying "cordova_not_available" I want to test the app with ionic serve on my windows system first before deploying it

How to completely hide the status bar in iOS using Cordova?

血红的双手。 提交于 2019-11-26 15:59:07
问题 I want to have no status bar for the Cordova app I am developing. I am nearly there, the status bar doesn't show on the splash screen. However on the first page that loads you see a flash of the status bar, before it gets hidden. I have checked the "hide status bar" checkbox in Xcode. I have added the cordova-plugin-statusbar plugin, and on the deviceready callback, I'm calling StatusBar.hide() . However when the splash image disappears and the first page is being rendered there is a flash of