cordova-plugins

add cordova plugin dependency to build.gradle

耗尽温柔 提交于 2019-12-11 00:14:24
问题 I searched extensively but cannot not find the maven repository for org.apache.cordova. I want to edit an existing plugin (from github) in android studio. I have tried adding the dependency by jar file. But generating the jar fails when "ant jar" with complex errors (cannot find symbols, pointing at the imports). Thanks for help Greetings Felix 回答1: Try adding to you local repository. Look ath this thread: I am attempting to add phonegap to my local maven repository for an android application

Google AdMob plugin for Cordova, App is closing when we are clicking on the Add and press back button to return to the App

痞子三分冷 提交于 2019-12-10 22:09:23
问题 I am using Cordova frame work to build an app,I had used Google AdMob plugin for Cordova to show the Adds in my App, and My problem is when user click on any add and tries to come back to the App by clicking back button the App was closing and the user has to start it from the beginning, what i need to do to over come this issue , Thanks in Advance... 回答1: Try adding following code in your Cordova Project Main Activity file after onCreate method - @Override protected void onResume() { // TODO

Using cordova to set values in the android project.properties file

别等时光非礼了梦想. 提交于 2019-12-10 21:53:23
问题 TL;DR I have a cordova app that is targeting both iOS and Android. Is there a way using config.xml to set the values inside the cordova generated file platforms/android/project.properties ? More details: There is an issue using certain plugins that make use of google play services that prevents me from building the app: FAILURE: Build failed with an exception. What went wrong: Execution failed for task ':transformClassesWithDexForRelease'. com.android.build.api.transform.TransformException:

cordova plugin installation issue when using node script in hooks folder

不羁的心 提交于 2019-12-10 20:49:21
问题 Cordova 3.4 hooks is not installing mentioned plugin's properly in iOS . I am adding install_plugins.js into the folder project/project_root/hooks/after_platform_add which has the following code in it: #!/usr/bin/env node //this hook installs all your plugins // add your plugins to this list--either the identifier, the filesystem location or the URL // It can also be git url like "https://github.com/chrisekelley/AppPreferences/" var pluginlist = [ "org.apache.cordova.camera", "org.apache

How to get iOS user-set device name with Cordova?

*爱你&永不变心* 提交于 2019-12-10 20:33:42
问题 I'm using the org.apache.cordova.device plugin. I see that device.name has been deprecated a while back in favor of device.model . When using device plugin 0.2.12 and iOS 8.1 on iPhone 5S, device.name is undefined . I still need to get the user's device name, like "Jerry's iPhone", so that the user can see which of their devices are using my app. How to do that with Cordova? 回答1: Your best bet might be modifying the Device plugin (with all the undesired consequences). I was able to get the

filePluginIsReady event is never fired in chrome when using cordova-plugin-file

我怕爱的太早我们不能终老 提交于 2019-12-10 18:37:10
问题 I am now developing a cordova app whitch platform is browser(Chrome). I failed when using the cordova-plugin-file to read a file. According to the document of cordova-plugin-file : Chrome quirks, It said that: Chrome filesystem is not immediately ready after device ready event. As a workaround you can subscribe to filePluginIsReady event....You can use window.isFilePluginReadyRaised function to check whether event was already raised. I wrote my code like this : document.addEventListener(

Cordova-Plugin-Contacts can't remove contact field

本秂侑毒 提交于 2019-12-10 18:26:31
问题 I'm retrieving all contacts from the system like this: navigator.contacts.find(["*"], function (contacts) {}); And then I pick one contact from the array (e.g. var myContact = contacts[4]; ). The contact has two or more phone number fields. Shortened version of the contact's object: { phoneNumbers: [ {id: 0, type: "work", value: "123123123"}, {id: 1, type: "home", value: "3216532425"} ] } When I remove one of the both contact fields from the phoneNumbers array and then save the contact, it

Can't upload base64 image using cordova-plugin-file-transfer

一个人想着一个人 提交于 2019-12-10 16:46:19
问题 I'm trying to upload my image in base64 to my server using cordova-plugin-file-transfer and until now it's not working. My code is like this: photoBase64 = photoBase64.replace('data:image/png;base64,', ''); var url = "http://MYURL.com/path"; var options = new FileUploadOptions(); options.fileKey = "file"; options.fileName = "photoName.png"; options.mimeType = "image/png"; var ft = new FileTransfer(); ft.upload(photoBase64, encodeURI(url), function(result) { console.log("Code = " + result

Extending the cordova gradle file to include google services

走远了吗. 提交于 2019-12-10 15:54:06
问题 I'm trying to include com.google.gms:google-services:3.0.0 into my cordova plugin without having to hack it into the main build.gradle file. I have added the following file to my application: build-extras.gradle buildscript { repositories { mavenCentral() jcenter() } dependencies { classpath 'com.google.gms:google-services:3.0.0' } } apply plugin: 'com.google.gms.google-services' I get the following error when trying to build the application: * Where: Script 'platforms/android/build-extras

Change Color of Splash Screen Spinner in cordova-plugin-splashscreen

拥有回忆 提交于 2019-12-10 14:50:02
问题 I'm about to finish my first App with Ionic/Cordova. YES it's GREAT, but sometimes I wonder why things are so complicated (with all those plugins and stuff :) ) I wonder if I can change the color of my Splash-Screen-Spinner . Any Ideas? I search in die Source-Code: Color, Spinner....., but i didn't find a hint. I think this would help so many people. Greetings 回答1: At least with Cordova 7.0 and Cordova iOS 4.4.0, there's no need to change the splash screen plugin's source code. You can just