cordova-plugins

Receive URL in Ionic/Cordova

孤街浪徒 提交于 2019-12-02 22:20:20
I'm trying to set up a way to receive a url from another app. Like, you are in browser, click share, and send the link to another app (my app). I found this cordova plugin , and have integrated it in my app, but I continue to not show any url when I test it. I get an alert that says: getUri url:null Any help would be great. Happy to add more code if helpful. app.js : 'use strict'; // angular.module is a global place for creating, registering and retrieving Angular modules // 'starter' is the name of this angular module example (also set in a <body> attribute in index.html) // the 2nd parameter

How to deal with cordova plugin when developing in browser?

て烟熏妆下的殇ゞ 提交于 2019-12-02 17:53:14
问题 I'm developing an application Ionic, Angular and Cordova and I'm looking for the best way to call Cordova plugins in Javascript while developing in the browser. What is the best practice? And how can I make it DRY? Let's say I'm using the Cordova globalization plugin. In order to prevent any errors when testing inside a browser, I would have to wrap the code inside a try and catch like this: try { navigator.globalization.getPreferredLanguage(onSuccess, onError); } catch (e) { console.log(e);

Ionic 3 get base64 audio string from recorded file

可紊 提交于 2019-12-02 17:28:14
问题 I am using cordova-plugin-media to record voice(with pause and resume features) in my ionic app for android. After I record it I need to get base64 string in order to play it using html audio tag. And the problem is: if I am trying to save recording which was paused and resumed as 3gp file('voice.3gp'), then when I use readAsDataURL method of cordova-plugin-file, I don't receive anything(the callback simply not called). If I am trying to save it as mp3 or wav file, then I receive only 1st

Specifying app_id and app_name for facebookConnect in a multi-device hybrid app in VS2013 & W8.1

喜夏-厌秋 提交于 2019-12-02 16:30:03
问题 I've been banging my head on this one for a while now. How do I specify the app_id and app_name when trying to use the facebookConnect plugin in a Multi-Device Hybrid app in Visual Studio 2013? If I create a new solution using the CLI approach; something similar to: cordova create MyTest <blah> <blah> <blah> I can probably use the CLI to add the plugin with a command similar to: (Untested and the command might be slightly wrong) cordova plugin add com.phonegap.plugins.facebookconnect BUT...

Cordova: Unexpected Machine Code - Your upload contains both bitcode and native machine code

随声附和 提交于 2019-12-02 16:13:28
I'm building an iOS Cordova app. And when I upload it to the iTunes Connect it returns the following error. Unexpected Machine Code - Your upload contains both bitcode and native machine code. When you provide bitcode, it's not necessary to include machine code as well. To reduce the size of your upload, use Xcode 7.3 or later, or any other toolchain that removes machine code. I've changed quite a lot of settings in config.xml today so I'm not sure whether I've did something wrong and is it some kind of a new iTunes Connect thing. As I understand it's quite easy to fix it changing some

Push Notifications in Ionic 2 with the Pub/Sub Model

妖精的绣舞 提交于 2019-12-02 14:51:11
问题 I am using the phonegap-plugin-push plugin to do Push Notifications in an Ionic 2 Chat App. I've implemented it according to the documentation, and it works, but only on the same device. i.e. it sends a notification to the phone if you supply its device token . My issue is for a chat app, I need a PubSub model. So that a user can publish to a topic and another user can subscribe to that topic even if they are on different decices. Looking at the documentation, it seems to be possible. See

How to get audio files on my phone using Ionic 2 Cordova plugins?

守給你的承諾、 提交于 2019-12-02 12:46:58
I have tried the Ionic mediaPlugin import { MediaPlugin } from 'ionic-native'; var file = new MediaPlugin('path/to/file.mp3'); I'm still confused on how to do that. All I want to do is to create something like a media player, that gets all the audio on a users android phone, and to play and pause it too. Check this tutorial first it will guide you. However check this too, it will tell you where you have to store your data. If you do it on android, you should use externalDataDirectory . this.filePath = cordova.file.externalDataDirectory; this.mediaPlugin = new MediaPlugin(this.filePath + this

Specifying app_id and app_name for facebookConnect in a multi-device hybrid app in VS2013 & W8.1

眉间皱痕 提交于 2019-12-02 12:42:03
I've been banging my head on this one for a while now. How do I specify the app_id and app_name when trying to use the facebookConnect plugin in a Multi-Device Hybrid app in Visual Studio 2013? If I create a new solution using the CLI approach; something similar to: cordova create MyTest <blah> <blah> <blah> I can probably use the CLI to add the plugin with a command similar to: (Untested and the command might be slightly wrong) cordova plugin add com.phonegap.plugins.facebookconnect BUT... How do I add it when I've created a Mutli-Device Hybrid app directly from within Visual Studio? I've

How to deal with cordova plugin when developing in browser?

微笑、不失礼 提交于 2019-12-02 11:29:10
I'm developing an application Ionic, Angular and Cordova and I'm looking for the best way to call Cordova plugins in Javascript while developing in the browser. What is the best practice? And how can I make it DRY? Let's say I'm using the Cordova globalization plugin. In order to prevent any errors when testing inside a browser, I would have to wrap the code inside a try and catch like this: try { navigator.globalization.getPreferredLanguage(onSuccess, onError); } catch (e) { console.log(e); } Or I would test if navigator.globalization is defined like this: if(navigator.globalization) {

Push Notifications in Ionic 2 with the Pub/Sub Model

谁说我不能喝 提交于 2019-12-02 11:08:37
I am using the phonegap-plugin-push plugin to do Push Notifications in an Ionic 2 Chat App. I've implemented it according to the documentation , and it works, but only on the same device. i.e. it sends a notification to the phone if you supply its device token . My issue is for a chat app, I need a PubSub model. So that a user can publish to a topic and another user can subscribe to that topic even if they are on different decices. Looking at the documentation , it seems to be possible. See android.topics and ios.topics . android.topics array [] Optional. If the array contains one or more