cordova-plugins

ionic Cordova Failed recording audio on IOS using Media plugin

梦想的初衷 提交于 2019-12-23 12:51:17
问题 i'm working on an ionic App and i need to record audio files , so i used the cordova-plugin-media , it worked fine for android but when i tried it on ios i get this error : {"message":"Failed to start recording using AVAudioRecorder","code":1} here is my code : var extension = '.wav'; var name = 'filename'; var audio = null; var filepath; $scope.startRecording = function() { name = Utils.generateFilename(); if(device.platform == "iOS") { //var path = "documents://"; //var path = cordova.file

How to change android local notification icon in ionic?

断了今生、忘了曾经 提交于 2019-12-23 10:58:39
问题 I'm using ionic to build an android app. I'm using $cordovaLocalNotification for local notifications. The notification works but it shows a default bell icon. How can I customize the notification icon? 回答1: $scope.scheduleSingleNotification = function () { $cordovaLocalNotification.schedule({ id: 1, title: 'GRM APP Builder', text: 'Quer café?!?', badge: 1, icon: 'res://coffee.png', data: { customProperty: 'custom value 1' } }).then(function (result) { console.log('Notification 1 triggered');

How can create google pay for Ionic 4 (android / ios ) app?

橙三吉。 提交于 2019-12-23 10:40:42
问题 I have created google pay for web using following URL : Google pay for Web I want to create same google pay for ionic 4 app which works on android and ios app How can I create? Any reference... Please guide... Thanks in advance 回答1: If you are using Ionic to write your application, you'll need to make use of native plugins on Android in order to integrate Google Pay in your application (note that at the moment we do not maintain a library on iOS). Once in the JVM domain –both Java or Kotlin–

ionic resume pause event prevent from fire on file browse only fire at press the home button

蓝咒 提交于 2019-12-23 09:10:32
问题 I am developing a chat app inside I am using on pause and on resume event. document.addEventListener('pause',onpause, false); document.addEventListener('resume' , onresume,false); This event works perfectly when I open the app and press home button to an Android phone these events are perfect. But my problem is that in chat app I am sending file attachments from the gallery when I select the browse button the phone image gallery, and same time pause event is fire. while I am on image gallery

How to run php code inside cordova?

▼魔方 西西 提交于 2019-12-23 07:58:09
问题 I am new to cordova and want to transfer my existing app build with jquery mobile and php to iOS/Android. Am I correct, that there is no php interpreter inside cordova? That would mean, that the existing app is not transfarable to cordova as php is a central component in building those html files inside the project. This would make it kind of useless for me. Is there a way to run php code inside cordova? 回答1: You cannot use any server-side scripting language (ex: PHP) inside cordova. But

Install node dependencies for Cordova plugin

风流意气都作罢 提交于 2019-12-23 07:36:52
问题 I'm writing a Cordova plugin, it has a node dependency for one of the hook scripts. Ideally when my plugin is installed: $ cordova plugin add my-cordova-plugin I would like it to run npm install if package.json has dependencies listed. Does Cordova support this feature in some way? Have I missed something? My current solution is another hook that runs after_plugin_install : module.exports = function (context) { var shell = context.requireCordovaModule('shelljs'); shell.cd(context.opts.plugin

Firebase notification in Phonegap Cordova

烈酒焚心 提交于 2019-12-23 05:11:09
问题 I'm trying to add notifications to my app in PhoneGap. For that, I'm using this plugin (https://github.com/fechanique/cordova-plugin-fcm). This seems to work. When I add a notification in firebase, I get it in the phone with the parameters I have set. Now I'm trying to get the parameters when the user entered into the app through a notification to take an special action with that data. According the the documentation in the link above, I should add this event: FCMPlugin.onNotification(

IONIC 3 and jsPDF , using FILE Transfer to download pdf not working

一个人想着一个人 提交于 2019-12-23 04:56:23
问题 i want to use jsPDF library with IONIC3 to download PDF , i have created a simple document and when i try to download it with the default function from jsPDF doc.Save() it work in my browser , but in a real device won't work. So i decided to use FileTransfer Plugins from IONIC native , i have firstly created a blob File from jsPDF output , then i tried to use the writeFile() function from IONIC FILE plugin to create a new file from the blob , then i tried to download that file using Download(

Cordova compass API (navigator.compass.watchHeading) not working (error code 3)

随声附和 提交于 2019-12-23 04:42:03
问题 I'm trying to get a sample app running using the cordova compass, but each time the error callback is called with error code 3. I use cordova V4.0 and of course I added the plugin org.apache.cordova.device-orientation. Here's the code: <!DOCTYPE html> <html> <head> <title>Compass Example</title> <script type="text/javascript" charset="utf-8" src="cordova.js"></script> <script type="text/javascript" charset="utf-8"> // The watch id references the current `watchHeading` var gWatchID = null; //

$localStorage data already there after I uninstalled and installed the ionic v1 app in Android device

故事扮演 提交于 2019-12-23 04:41:32
问题 I am developing an ionic v1 mobile application. When I uninstalled the app from Android device, the data saved in $localstorage are already persist there after I installed the app again. I am also using cordova-plugin-crosswalk-webview version 2.2.0 Other information: Cordova CLI: 6.3.1 Gulp version: CLI version 3.9.1 Gulp local: Local version 3.9.1 Ionic Framework Version: 1.1.1 Ionic CLI Version: 2.1.1 Ionic App Lib Version: 2.1.1 Node Version: v4.4.1 I would gladly appreciate any kind of