cordova-plugins

Cordova doesn't send origin on request in some Android devices

半世苍凉 提交于 2019-12-20 14:14:40
问题 This is a problem that happens on some android devices. I have a Samsung Galaxy A5 (2017) with Google Chrome version 76.0.3809.89 and Android version 8.0.0. When I deploy my Cordova application for the first time on this device and making a POST request I receive an error about CORS: Access to XMLHttpRequest at 'http://foo.com/bar' from origin 'file://' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is

How to see the app changes on a device in real time?

空扰寡人 提交于 2019-12-20 05:18:13
问题 Every time I change a code even it's only one line I have to run the command sudo ionic cordova prepare ios and I have to click play button on Xcode to unable to upload the app on the iPhone and see the changes in action. Basically every time I want to test the app, I am repeating this steps and each time it takes approximately 4 minutes to see if this single line of code I wrote is working or not. Is there a way to see this changes in real time? If I run sudo ionic serve and if I make a

Cordova: CSP issue on Android when requesting data over HTTPS

眉间皱痕 提交于 2019-12-20 05:16:16
问题 Cordova Android is an Android application library that allows for Cordova-based projects to be built for the Android Platform. Cordova based applications are, at the core, applications written with web technology: HTML, CSS and JavaScript. Apache Cordova is a project of The Apache Software Foundation (ASF). I have developed an app with Cordova which works as expected on iOS, and on Android when the signed app gets deployed from Android Studio direct to a Samsung S6. However, when downloading

Add an “exclude module” rule to an entry in plugin.xml for Cordova

南笙酒味 提交于 2019-12-20 02:28:33
问题 I'm stucking with this error trying to build my phonegap project As far I know this error because there is a library is set twice in the project. I check all my libraries and I found only one library causing this(found in one of my plugins) <framework src="com.android.support:design:23.4.0"/> The thing is, can I set an exclude module rule in the plugin.xml file? I think I need to exclude com.android.supportv4 回答1: Finally I resolved it, I had to create a build-extras.gradle file in my plugin

InAppBrowser does not play Youtube videos on full screen mode in ionic

十年热恋 提交于 2019-12-19 11:46:21
问题 I am developing an Android app using Cordova and Ionic framework. I am playing a YouTube video with InAppBrowser using the code below: window.open('https://www.youtube.com/watch?v=v8WjMiodcKo'); But the issue is it opens inappbrowser but doesn't have full screen mode option to watch videos. Is there anyway to do this? 回答1: I know that the answer is kind of "old" but as I run into this and the answer doesn't really fix the underlying problem: The real answer to this is that this is a

cordova-plugin-media callback methods

拟墨画扇 提交于 2019-12-19 08:04:05
问题 I am using cordova-media-plugin 1.0.1. in an Ionic mobile app. I am using the plugin to play the audio file. I am able to get it to play using: var media = $cordovaMedia.newMedia(fileToPlay, // success callback mediaSuccess, // error callback mediaFailure, // status callback mediaStatus ); I can then call media.play() at it plays the file. However, the callbacks never seem to execute. I have them defined as: function mediaSuccess () { console.log("Successfully finished task."); } function

cordova-plugin-media callback methods

大兔子大兔子 提交于 2019-12-19 08:02:03
问题 I am using cordova-media-plugin 1.0.1. in an Ionic mobile app. I am using the plugin to play the audio file. I am able to get it to play using: var media = $cordovaMedia.newMedia(fileToPlay, // success callback mediaSuccess, // error callback mediaFailure, // status callback mediaStatus ); I can then call media.play() at it plays the file. However, the callbacks never seem to execute. I have them defined as: function mediaSuccess () { console.log("Successfully finished task."); } function

How to loop a audio in phonegap?

浪尽此生 提交于 2019-12-19 06:19:08
问题 I'm using phonegap 2.2.0. I tried some code to loop the audio for playing without interruption but it is not working on my android device . It plays only once. Here is my code: function playAudio(url) { var my_media = new Media(url, function() { console.log("playAudio():Audio Success"); }, function(err) { console.log("playAudio():Audio Error: "+err); }, function(status) { console.log("playAudio():Audio Status: "+status); } }); // Play audio my_media.play({numberOfLoops:99}); } Can you tell me

What is the purpose of fetch.json file inside cordova plugins folder?

爷,独闯天下 提交于 2019-12-18 14:11:30
问题 File fetch.json created inside plugins folder after cordova plugin add executed first time. This file also modified each time I add/remove plugins. What purpose of this file exactly? What tools use this file, when and why? Is there a way to restore plugins using fetch.json (try not to place plugins into repositiory)? Where can I find some docs about content of this file? Content of fetch.json: { "com.phonegap.plugins.PushPlugin": { "source": { "type": "git", "url": "https://github.com

Cordova plugin ListPicker error on Ripple emulator

旧街凉风 提交于 2019-12-18 09:29:19
问题 I'm using Cordova within Visual Studio and added the ListView plugin. The plugin was added successfully via the config.xml editor screen When I call window.plugins.listpicker.showPicker I can trace all the way to cordova.exec(_callback, _error_callback, 'ListPicker', 'showPicker', [config]) then Ripple displays the "I Haz Cheeseburger" error on ListPicker.showPicker We seem to be missing some stuff :( I have verified that the plugin is listed in the plugins folder with other plugins that I am