cordova-plugins

Do I need to register to APNs to use GCM Push notifications in iOS?

℡╲_俬逩灬. 提交于 2019-12-22 13:53:52
问题 I am building a hybrid APP with cordova. I am using the phonegap-plugin-push to register to GCM so i can push notifications to Android. My question is if i need the APNs certificates to be able to use GCM in iOS, or if with the plugin alone and the registration to GCM is enough? 回答1: Short answer, Yes. You must then upload your APNs Certificate to GCM. Check out this Route 85 video about Sending Notifications on iOS through GCM. Other useful links for you: https://developers.google.com/cloud

cordova contacts plugin contact data is duplicating instead of overwriting contact data

亡梦爱人 提交于 2019-12-22 13:49:11
问题 I have feature in my app that checks users contacts using cordova contacts plugin with an online database of users. If the any of the contacts in the users device have accounts the data from the account is updated on the device. The function works with things like name and date of birth but emails and phone numbers don't overwrite the existing contact data it instead creates new entry for these. This particular user should only have 1 email address and 1 phone number. JSON reponse and save

$cordovaFile.checkDir says folder does not exist but $cordovaFile.createDir says folder already exists

冷暖自知 提交于 2019-12-22 10:37:46
问题 I am trying to work with the ngCordova File plugin as documented here: http://ngcordova.com/docs/plugins/file/, but am getting strange behaviour. I am trying to create a folder if it does not already exist. I am testing for its existence using: $cordovaFile.checkDir(cordova.file.dataDirectory, 'inbound') Now this returns NOT_FOUND_ERR so i try to create the folder subsequently by calling: $cordovaFile.createDir(cordova.file.dataDirectory, 'inbound', false); But this then returns PATH_EXISTS

ionic cordova : how to display an image in img tag from android gallery when i get content:// url from filechooser plugin

江枫思渺然 提交于 2019-12-22 09:57:09
问题 i wasted 6 days (and counting) struggling to display an image from gallery on android using ionic3-cordova this.fileChooser.open() .then((uri) => { console.log('image uri is', uri); }) i cannot use uri directly to bind to my tag's src i tried to use another plugin and get a file entry return this.file.resolveLocalFilesystemUrl(uri); i cannot use that either... unsafe uri! then i used this.domSanitizer.bypassSecurityTrustUrl(entry.toInternalURL()); and i cannot use that either to bind to img

How to get IMEI Number in Cordova?

女生的网名这么多〃 提交于 2019-12-22 06:35:49
问题 I am developing an application in Cordova which requires to get the IMEI number of any device programatically. Cordova Provides the UUID number but that won't work for me, I need IMEI number. Or is there any plugin to get the IMEI Number directly? "IMEI PhoneGap Plugin in Android" it gives custom plugin that only work for the android I need plugin which support for both android as well as ios. "How to programmatically get the devices IMEI/ESN in Android" it gives java code for the android so

cordova-plugin-fcm ERROR : invalid api key

倾然丶 夕夏残阳落幕 提交于 2019-12-22 05:59:24
问题 I am using cordova-plugin-fcm. I have followed the installation instruction: install plugin add the google-services.json to my root folder I wanted to test it through their testing server, but I get the error: ERROR: invalid api key The key I inserted was the one from the file google-service.json in the entry: "api_key": [{"current_key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}] How can I do the testing properly? 回答1: When using FCM, you should always make use of the Server Key seen in the Cloud

cordova-plugin-whitelist working on Android but not iOS (Phonegap Build)

笑着哭i 提交于 2019-12-22 05:38:35
问题 I'm working on a JavaScript app wrapped in Cordova and built with Phonegap Build. We're including cordova-plugin-whitelist from npm in our build and have added <access origin="*" /> to our config.xml and an open CSP ( <meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'"> ) in our index.html. The app works fine on Android and talks to our server without issues, but on iOS all requests fail

ionic 2 - inappbrowser “browser.on(…).subscribe is not a function” error

删除回忆录丶 提交于 2019-12-22 05:17:23
问题 I follow this http://ionicframework.com/docs/native/in-app-browser/ document for use inappbrowser and try with below steps : 1- install ionic cordova plugin add cordova-plugin-inappbrowser npm install --save @ionic-native/in-app-browser 2 - Add this plugin to app.module.ts provider 3 - add to constructor : constructor(private iab: InAppBrowser) { } 4- and use it in launch method like this : import { InAppBrowser,InAppBrowserEvent} from '@ionic-native/in-app-browser'; launch(urlc){ let url =

Cordova iOS - InAppBrowser always on top issue

混江龙づ霸主 提交于 2019-12-22 00:55:49
问题 I am creating an Apache Cordova app. I have added InAppBrowser plugin and barcode scanner plugin that is invoked from the page opened inside InAppBrowser through cross browser communication. It is running perfectly fine in Android. But when ran in iOS, the InAppBrowser acts like a modal pop-up and doesn't let barcode scanner appear until the InAppBrowser is closed/dismissed. I have confirmed that barcode scanner is working even when in background but it just won't appear because the

How to implement pushwoosh with ionic 2

血红的双手。 提交于 2019-12-22 00:35:54
问题 I want to implement pushwoosh in ionic 2 i am using this cordova plugin. i am new to ionic 2 want to know how to use methods from this plugin. 回答1: First read the pushwoosh manual about using the cordova plugin: http://docs.pushwoosh.com/docs/cordova-phonegap After that i got this code working on ios and android. On step 3, you can use the following code as a service provider: in my projects folder i created this file: /src/app/providers/push-service.ts import { Injectable } from "@angular