cordova-plugins

$cordovaFile method does nothing when called?

给你一囗甜甜゛ 提交于 2020-01-06 02:14:15
问题 I'm trying to use the ngCordova plugins in my Ionic app, but I can't seem to get them working properly. Here is my Controller : .controller('InspectionCtrl', ['$scope', '$stateParams', '$cordovaDevice', '$ionicPlatform', '$cordovaFile', function($scope, $stateParams, $cordovaDevice, $ionicPlatform, $cordovaFile){ document.addEventListener("deviceready", function () { //When save button is clicked, call this function $scope.save = function() { $cordovaFile.writeFile(cordova.file.dataDirectory,

How to read/write a file in Meteor-Cordova?

徘徊边缘 提交于 2020-01-05 10:10:09
问题 After days of useless research (I've tried all possible tutorials and code snippets on the Internet, Github, SO etc.) I'm desperately looking for a way to use Cordova file plugin to: read a text / json file write a text file In most of my attemps I get fileErrror error codes 1 and 5. Also, I'm not sure whether I should create a directory assets, or public or whatever. I'm using Crosswalk package. An example of code I've tried out: https://stackoverflow.com/questions/33156697/filesystem-api

Is the source code to cordova plugins visible, just like that html and javascript code?

穿精又带淫゛_ 提交于 2020-01-05 09:30:43
问题 I understand that in a Cordova application, one can see the html, and javascript code easily. What about native (C++) plugins ? Is the source code to them visible as well ? I have just started learning about Cordova, so I don't fully understand how they are compiled as yet. I am planning on using Cordova 5.x+ EDIT: This is not the same as the other question. This question is explicitly about whether one can see the source code of a native plugin. The other question is about whether someone

How can I install the facebookconnect cordova plugin?

那年仲夏 提交于 2020-01-05 07:49:10
问题 I am trying to use the com.phonegap.plugins.facebookconnect plugin. To install it, I must provide two variables, like this: cordova plugin add com.phonegap.plugins.facebookconnect --variable APP_ID="<app_id>" --variable APP_NAME="<app_name>" This works, but then the build fails because of this issue. BUILD FAILED /Applications/Android Studio.app/sdk/tools/ant/build.xml:720: The following error occurred while executing this line: /Applications/Android Studio.app/sdk/tools/ant/build.xml:734:

Firebase Cloud Messaging Refresh Token

核能气质少年 提交于 2020-01-05 05:28:06
问题 I am using this Cordova plugin for Firebase in FCM for my PhoneGap project, but I got no idea how I can implement the login, sign up, and log out so that I can send a push notification to a specific username when the user logs-in. My idea is when the user logs-in, it will generate a new token and store the new token with the username in MySQL database and on user logout, it will update new token. But in the documentation, there is no way to refresh the token by using JavaScript. Thanks. 来源:

SignatureDoesNotMatch error when uploading to s3 via a pre signed url using Ionic 2

点点圈 提交于 2020-01-04 07:47:12
问题 I am trying to upload a video to s3 and have a pre-signed PUT url. The following is the code to do so. import {Component} from '@angular/core'; import {NavController} from 'ionic-angular'; import {MediaCapture} from 'ionic-native'; import {Http} from '@angular/http'; import { Transfer } from 'ionic-native'; @Component({ selector: 'page-home', templateUrl: 'home.html' }) export class HomePage { public base64Image: string; constructor(private navController: NavController, public http: Http) {

Test in-app purchase on iPhone before app submit

拈花ヽ惹草 提交于 2020-01-04 05:27:54
问题 I'm developing a Cordova app that contains in-app purchase. I've already got working the Android side, so the plugin flow is working. Now I'm testing the iOS side and I can't get products correctly: they are invalid and not complete, it seems the app is not able to download product data. I've defined IAP (consumable) items in iTunes, associated dummy image and they show "Ready to submit" status (yellow bullet) IAP products are also associated in the new app version page, not submitted for

Ionic 3 : Android add platform fails after installing cordova-plugin-camera and Native Web-intent

拥有回忆 提交于 2020-01-03 17:11:20
问题 And first of all, thank you for the time you'll take to help me! Summary: Tried to add the cordova-plugin-camera to my ionic 3 project. After many fails and finally a success, now my app does not build on my android anymore. -------- START EDIT -------- After much tests, it seems that there is a conflict/issue when I have both plugins camera and web-intent installed. Both plugins are from Ionic Native: camera plugin : cordova-plugin-camera web-intent : com-darryncampbell-cordova-plugin-intent

Cordova: LocalFileSystem is not defined

懵懂的女人 提交于 2020-01-03 10:15:44
问题 I am not able to get the cordova file system to work. I have a project with the following dependencies: com.ionic.keyboard 1.0.3 "Keyboard" org.apache.cordova.console 0.2.12 "Console" org.apache.cordova.device 0.2.13 "Device" org.apache.cordova.file 1.3.2 "File" org.apache.cordova.file-transfer 0.4.8 "File Transfer" In app.js I define a dependency on a controller module: angular.module('starter', ['ionic', 'controllers']); The controller code is basically this: angular.module('controllers', [

Instagram-like force touch popup modal

柔情痞子 提交于 2020-01-03 07:24:07
问题 I'm trying to replicate force touch functionality of Instagram where 1) Put your finger on an image and it gets a little darker (hover effect, easy) 2) Press a little harder and a popup modal preview of the content appears 3) Press even harder and it expands the modal to full screen I'm having problems with Ionic 4/Cordova "3d touch" plugin where it doesn't register the force-touch if I regular-touch the screen first. In order words, step 2 above does not trigger the force touch when