phonegap-plugins

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

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() { //

PhoneGap: BarcodeScanner Sharing Plugin

左心房为你撑大大i 提交于 2020-01-15 02:45:08
问题 Note: I wanted to develop IOS and Android application with QR code scanning feature. I do not own Mac machine, I'm using Netbean / Eclipse in WIndows OS. Question: Is it possible to have single codebase written with Eclipse Windows OS + android BarcodeScanner Plugin, and get built into IOS application via Adobe Cloud Build service Deeply appreciated if someone could give me an advice. 回答1: If you're using the online compiler of phonegap (Phonegap Build) then it's possible to use a plugin for

location update auto pause iOS

本小妞迷上赌 提交于 2020-01-14 22:54:47
问题 I'm building an iOS app using phonegap. I'm trying to get iOS to update its current position to my app when the app runs in the background. I've registered the location updates background mode however it's not reliable. After some research, I believe that iOS is automatically pausing the location updates. There's an attribute in CLLocationManager called 'pausesLocationUpdatesAutomatically' that I think is responsible for this behavior. The following declaration is from CLLocationManager.h in

location update auto pause iOS

泄露秘密 提交于 2020-01-14 22:54:21
问题 I'm building an iOS app using phonegap. I'm trying to get iOS to update its current position to my app when the app runs in the background. I've registered the location updates background mode however it's not reliable. After some research, I believe that iOS is automatically pausing the location updates. There's an attribute in CLLocationManager called 'pausesLocationUpdatesAutomatically' that I think is responsible for this behavior. The following declaration is from CLLocationManager.h in

Phonegap adding plugin using command line tool

久未见 提交于 2020-01-14 14:00:35
问题 I am new in phonegap, i go through steps define in phonegap official site for creating project using command line tool( nodejs ). i success to create project and adding platform but, following error occur when i am trying to add plugin. Command : cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-battery-status.git error : [Error: Error fetching plugin: Error: git command line is not installed] how can i resolve this error and how can i install git command line? Thanks

content-security-policy meta tag for allowing web socket

爱⌒轻易说出口 提交于 2020-01-14 08:45:08
问题 Situation: autoreload of phonegap serve blocked by content-security-policy meta tag Adding content security policy prevents auto-reload of phonegap serve utility. This is built on top of cordova serve but auto-reloads the app on file editing. It works by injecting socket.io in index.html . What should I specify in my CSP meta tag that will allow socket connections to my laptop. Here is my current CSP meta tag: <meta http-equiv="Content-Security-Policy" content="default-src 'self' 192.168.0

Phonegap file plugin- copy file from app package to persistent storage

删除回忆录丶 提交于 2020-01-14 06:32:16
问题 Issue: Using Phonegap on iOS I want to copy a image from the application package example http://localhost/img/test.png to the local persistent storage. I'm ok getting the persistent storage via window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, gotFS, fail) . But how do I get the folder of the www root? Per file plugin docs I assume I somehow need to use cordova.file.applicationDirectory. Unfortunately the doc doesn't specify where/how to do that. I've tried some ways but no luck so far.

Phonegap: “processMessage failed” unable to send javascript function (Cordova 2.5.0)

会有一股神秘感。 提交于 2020-01-14 02:20:11
问题 I am trying to make GCM push notifications work in my app and therefore I am using this project (https://github.com/marknutter/GCM-Cordova) as an example. When I run the example code everything works fine, but when I transfer all the required files and edit my code to let it work in my own app it does not work anymore. I also tried the following plugin (https://github.com/phonegap-build/PushPlugin) and after installing it automatically it gives exactly the same error. The app does not crash,

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