cordova-plugins

iOS Cordova: Does Cordova create multiple instances of an objective-C plugin when called more than once?

时光总嘲笑我的痴心妄想 提交于 2020-01-16 01:12:08
问题 I am working on a iOS hybrid application based on Cordova. We have a Objective-C plugin file (MyPlugin.h and MyPlugin.m) which is typically a subclass of CDVPlugin. We call the objective-C plugin from a JavaScript file like below. cordova.exec(success, error, "MyPlugin", "callNativeActivity", args); Here, success- success callback function, error- error callback function and args- array of arguments. Below is the native plugin method signature. -(void)callNativeActivity:(CDVInvokedUrlCommand

Native library not loaded from cordova apk

眉间皱痕 提交于 2020-01-15 10:37:09
问题 I'm making a cordova plugin that would be a simple wrapper for a .jar file and its two .so dependencies. I have tried it before in a normal android application with android studio. By copying the native libraries into the jniLibs/armeabi folder and the jar file into libs/ it worked perfectly. At the cordova plugin I've made the same folder structure and everything is on the same place. In the plugin.xml I have copying the two files into libs/armeabi which is working because if I look into the

how to use cordova plugins with phonegap cli

不羁岁月 提交于 2020-01-15 10:29:27
问题 I am new to phonegap and want to install try install a plugin. There are many websites explaining to use command cordova plugin add <plugin name> .When I type this its shows cordova is not recognized as command . This may be because I have installed Phonegap cli through npm install -g phonegap . So now whenever I try to add a cordova plugin its showing not a command. Is that I can use only plugins made specifically for phonegap. I know that in phonegap build I only need to add a line in

How to imlement print on Android using Cordova?

戏子无情 提交于 2020-01-15 06:38:27
问题 I want to implement print functionality in Android app, I'm using AngularJS. I have tried the below code, but it works only on browser, it doesn't work on Android. AngularJS: $scope.print = function (divName) { var w = window.open(); w.document.write($('#' + divName).html()); w.print(); w.close(); } Html: <img ng-click="print('print');" class="card-img-top image-responsive" src="./plugins/images/print.png" alt="Card image cap"> <div id="print" style="display:none;"> <style> @page { size: auto

Run application in background Cordova

你。 提交于 2020-01-15 06:19:08
问题 I'm developing a Cordova application that sends data (registration and image) for external server, it is already working but would like to make it if the user has no internet at registration, the application is running in background waiting for internet connection to send data, how to do this? 回答1: Use this plugin cordova plugin add cordova-plugin-network-information and cal your code in this callback function document.addEventListener("online", onOnline, false); function onOnline() { //

Cordova IOS camera plugin not working when trying to open from inappbrowser

萝らか妹 提交于 2020-01-14 06:26:28
问题 I am working for a hybrid mobile app using cordova 6.0.0. According to my requirements , I have to open dynamic url in web view. The url would be provided by api response. I am using the cordova in app browser plugin for web view. https://github.com/apache/cordova-plugin-inappbrowser Now when user clicks on any link in the page opened in the web view , I have to catch that click event and find the href value of the anchor tag on which user had clicked. And if target url will match my

Ionic2, how to import custom plugin (appsee or uxcam) into Ionic App

此生再无相见时 提交于 2020-01-14 02:12:10
问题 I am trying to use Appsee or UXcam I tried import like below, but no luck // import { Appsee } from '@ionic-native/appsee'; Else where i saw that you have to declare the variable in question for typescript to recognize the variable, I did that like below declare var cordova:any; // import { Appsee } from '@ionic-native/appsee'; declare var cordova:any; @Component({ templateUrl: 'app.html' }) export class MyApp { rootPage:any = LoginPage; // FOR TESTING constructor(platform: Platform,

How add android ssl certificate for https request in ionic?

痴心易碎 提交于 2020-01-13 10:13:22
问题 In ionic simulator all http and https working fine but in real device release version its stop working. Many people adviced to add SSL certificate for release version but I dont know how to add this ? I have tries all this to make https request ? <access origin="*"/> <access origin="*"/> <allow-navigation href="*"/> <allow-intent href="*" /> Also added whitelist plugin but not working. Also tried this but not working <meta http-equiv="Content-Security-Policy" content="default-src *; style-src

Is it possible to build Cordova App online?

久未见 提交于 2020-01-12 18:21:20
问题 I am making making an app using PhoneGap framework. PhoneGap provides build Service (http://build.phonegap.com) that allows us to build and package app in cloud .You do not need to install any SDK locally to build app. Is there any way to build cordova app Online 回答1: Did you try Monaca? They have free plans: https://monaca.io 回答2: You could also use Intel XDK platform. I've found very useful to develop in brackets+chrome and test and build in intel xdk. They have a very powerful emulator

Android: phonegap/cordova: switch full screen mode while app is running

浪尽此生 提交于 2020-01-12 10:46:10
问题 I want to switch between full screen mode and normal mode while my app is running. is there any phonegap plugin to do this for me (Android) ? if no, Please tell me how can I switch between full screen and normal in java, called in javascript. 回答1: It's possible to do using this plugin: https://github.com/mesmotronic/cordova-plugin-fullscreen it has functions AndroidFullScreen.showSystemUI, AndroidFullScreen.leanMode, AndroidFullScreen.immersiveMode to do the switch. 回答2: Try the following