cordova-plugins

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

て烟熏妆下的殇ゞ 提交于 2019-12-01 21:45:59
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 Finally I resolved it, I had to create a build-extras.gradle file in my plugin containing the following lines: configurations { all*.exclude group: 'com.android.support', module: 'support

cordova windows error: “cordova/windows8/commandProxy” not found

自作多情 提交于 2019-12-01 18:16:04
问题 I have built a Cordova-based Windows application. As soon as I add any plugin, the app starts crashing with the exception cordova/windows8/commandProxy not found . Cordova version: 4.3.0 回答1: It seems that cordova/windows8/commandProxy is deprecated in Cordova 4.3.0. I have replaced this statement in plugin file require("cordova/windows8/commandProxy") to require("cordova/exec/proxy") and it seems to work. For example I changed line number 18 in PushPluginProxy.js from require("cordova

How get data from cordova-plugin-nativestorage in android java

一笑奈何 提交于 2019-12-01 17:44:23
Good day, I making native background mod for Cordova and I need get data from js to java. I save data in js with plugin cordova-plugin-nativestorage , with this code: <!DOCTYPE html> <html> <head> <title>Save data</title> <script type="text/javascript" charset="utf-8" src="cordova.js"></script> <script type="text/javascript" charset="utf-8"> function onLoad() { document.addEventListener("deviceready", onDeviceReady, false); } function onDeviceReady() { NativeStorage.setItem("somekey", "value", null, null); } </script> </head> <body onload="onLoad()"> </body> </html> but my problem is: I don’t

Install Cordova plugin without package.json file on it

删除回忆录丶 提交于 2019-12-01 17:37:45
I'm trying to install a Cordova Plugin with Cordova CLI 7. This plugin does not have a package.json file on it, so it throws an error when adding it to my project. I've tried converting the config.xml file using plugman. And it works fine for Android but it doesn't for iOS. I feel like I'm missing some configuration from the config.xml in my package.json file. Is there a way to safely convert the config.xml in a package.json file? or a way to install it using the config.xml file? Thanks Yes, since Cordova 7, the installation of platforms and plugins are by default performed using cordova-fetch

Cordova plugins not working with ionic

≡放荡痞女 提交于 2019-12-01 14:24:35
问题 I have an Ionic app built with Angular. I am using is Calendar plugin: https://github.com/EddyVerbruggen/Calendar-PhoneGap-Plugin I want to create events through the plugin and save them to the local device's calendar. I have added the plugin though: cordova plugin add https://github.com/EddyVerbruggen/Calendar-PhoneGap-Plugin.git And I try to use it in my controller: ionic.Platform.ready(function(){onError); window.plugins.calendar.createEvent(title, location, notes, start, end, onSuccess,

Cordova build returns missing plugin.xml

送分小仙女□ 提交于 2019-12-01 13:55:10
问题 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 the plugin error occurs as Error: ENOENT, no such

Bind a native iOS event to a webView using a custom Cordova plugin

ぃ、小莉子 提交于 2019-12-01 12:01:54
问题 I have to create a plugin to catch events occurring in the Cordova webView of my iOS application and trigger actions in the native part of the app, and vice versa. I have followed this tutorial and it works perfectly. When I try to adapt it to another app (I wanted it more general than the tutorial is), it works from the webView to the native part, but not the other way. I am just trying to click on a button on a navigationBar to change the background color of my webView. At the moment, it

Unable to run bms-samples-cordova-hellopush - bms_samples_cordova_push-Swift.h file not found

淺唱寂寞╮ 提交于 2019-12-01 11:46:38
问题 I am trying to run the Push notifications sample available on GitHub. Unfortunately, the configuration as outlined here doesn't work. Docs say: At the top of your AppDelegate.m : #import "[your-project-name]-Swift.h" If your project name has spaces or hyphens, replace them with underscores in the import statement. Example: // Project name is "Test Project" or "Test-Project" #import "Test_Project-Swift.h" So I did for the sample: #import "bms_samples_cordova_push-Swift.h" ObjC Bridging Header

InAppBrowser passing a callback function

早过忘川 提交于 2019-12-01 10:57:03
问题 I have a InAppBrowser working fine in my app $scope.openInAppBrowser = function (url) { var ref = window.open(encodeURI(url), '_blank', 'location=yes'); ref.addEventListener('loadstop', function (event) { if (event.url.match("close")) { $scope.refreshGamePage = 1; // this variable is under watch in a directive ref.close(); } }); } here is the directive written to refresh the page module.directive('reloadPage', ['$http', function ($http) { return { restrict: 'A', link: function ($scope,

Ionic splash screen and spinner

偶尔善良 提交于 2019-12-01 08:31:53
Is there a way to customize spinner in splash screen? Currently I am using cordova splashscreen plugin and I want to change the color of spinner that appears on the splash screen. froger.me In platforms/android/src/org/apache/cordova/splashscreen/SplashScreen.java , at the top: import android.graphics.drawable.Drawable; import android.content.res.Resources; And further down the bottom replace with this function: // Show only spinner in the center of the screen private void spinnerStart() { cordova.getActivity().runOnUiThread(new Runnable() { public void run() { spinnerStop(); spinnerDialog =