cordova-plugins

Ionic cordova-plugin-qrscanner has no camera preview

試著忘記壹切 提交于 2019-12-05 04:32:00
I run a simple demo to use cordova-plugin-qrscanner, it can scan qrcode but no camera preview. qrscannerDemo on Github Related code blow: import { Component } from '@angular/core'; import { NavController } from 'ionic-angular'; import { AndroidPermissions } from '@ionic-native/android-permissions'; import { QRScanner, QRScannerStatus } from '@ionic-native/qr-scanner'; @Component({ selector: 'page-home', templateUrl: 'home.html' }) export class HomePage { constructor(public navCtrl: NavController, public androidPermissions: AndroidPermissions, public qrScanner: QRScanner) { } qrscanner() { //

Build Error -Ionic Cordova fails for android [duplicate]

强颜欢笑 提交于 2019-12-05 04:18:33
This question already has an answer here: Running “cordova build android” - unable to find attribute android:fontVariationSettings and android:ttcIndex 27 answers I get following error while running the command "ionic cordova build android --stacktrace" : :generateDebugResources :mergeDebugResources :processDebugManifest :processDebugResources ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontVariationSettings FAILED ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:ttcIndex I am using following tools on Window's: Editor : VScode

Two cordova plugins modifying “*-Info.plist” CFBundleURLTypes

痞子三分冷 提交于 2019-12-05 01:49:22
问题 I have 2 cordova plugins that are modifying CFBundleURLTypes: The first one: <config-file target="*-Info.plist" parent="CFBundleURLTypes"> <array> <dict> <key>CFBundleURLSchemes</key> <array> <string>$URL_SCHEME</string> </array> </dict> </array> </config-file> The second one: <config-file target="*-Info.plist" parent="CFBundleURLTypes"> <array> <dict> <key>CFBundleURLSchemes</key> <array> <string>fb$APP_ID</string> </array> </dict> </array> </config-file> Only the first plugin that is added

Reduce boot time in ionic-2 app

六眼飞鱼酱① 提交于 2019-12-05 00:30:11
问题 I am new to ionic-2 project.I just want to know how to reduce boot time of app.Because after 3 sec of splash screen , it shows white screen and takes 9 sec to start. 回答1: Try to put this on the second line of your main.ts file import { enableProdMode } from '@angular/core'; then before the bootstrap line put enableProdMode(); also when building use --prod so ionic build android --prod 回答2: Please follow below steps to reduce splash screen time:- First, delete your node_modules folder Delete

How to force cordova to recompile added plugins?

不问归期 提交于 2019-12-04 23:10:25
It seems cordova caches compiled plugins, when i change the source code of plugins ( .java files on windows), the only way to force cordova to recompile the plugin is to remove and then add that plugin again, which is a pain . Is there any way to clean cordova cache or force it to recompile added plugins ? Not afaik, the only workaround I've found is to use a before_prepare script to remove and add the plugin every time you prepare the app: / |--hooks/ |--before_prepare/ |--000_RefreshPluginXXX.sh 000_RefreshPluginXXX.sh: !#/user/bin/env bash cordova plugin rm yourPlugin cordova plugin add

Setting AVAudioSession Category has no effect on sound from WKWebView

╄→尐↘猪︶ㄣ 提交于 2019-12-04 23:09:48
问题 I can not seem to override the AVAudioSession category or port when audio is being played from a WKWebView. The same code works perfectly when using a normal UIWebView. AVAudioSession *session = [AVAudioSession sharedInstance]; [session setCategory:AVAudioSessionCategoryPlayAndRecord error:&err]; I've also tried activating the sharedInstance like this, but it did not help: [session setActive: YES error: nil]; The above code has no effect on audio coming from a WKWebView. I did find some

Plugin to get the version of PhoneGap App?

别来无恙 提交于 2019-12-04 23:07:49
I am using PhoneGap build to package my app is there any PhoneGap or 3rd Party Plugin that I can include in my config.xml to get the version of the app in the runtime? Any suggestion on best way to get the version of the App would be appriciated. Lee Crossley This plugin works on iOS, Windows Phone 8 and Android: http://plugreg.com/plugin/whiteoctober/cordova-plugin-app-version If you're using the Cordova CLI, you can install via: cordova plugin add https://github.com/whiteoctober/cordova-plugin-app-version.git Then it's as simple as: cordova.getAppVersion(function (version) { alert(version);

How to scan all nearby ibeacons using coordova based Hybrid application?

女生的网名这么多〃 提交于 2019-12-04 21:05:02
I am planning to develop a hybrid application that will scan ibeacons , can you please point me to right cordova plugin that has this facility? I was referring to petermetz/cordova , but it seems it doesn't have scan facility I am NOT using Angular JS, so please don't refer to ng plugins Thanks, Rohit Yes, the cordova-plugin-ibeacon is the one to use. It does support scanning for beacons, although the examples don't make this obvious. Check out the "Start ranging a single iBeacon" example. The only difference between looking for a single beacon and lots of beacons is that you set the

After reseting plugins, Ionic 2 program doesn't work?

淺唱寂寞╮ 提交于 2019-12-04 19:47:43
I used many plugins in my Ionic 2 project. All things works fine before. But after launching ionic state reset --plugins , some objects cannot be found any more. I've used Beacon Plugin in my project. ----edit---- What it doesn't work is Cannot read property 'Delegate' of undefined in var delegate = new this.locationManager.Delegate(); ----edit---- The most weird thing is that ionic serve works (Browser), but ionic run android (Device) doesn't. ----edit---- After ionic platform rm android and ionic platform add android , still doesn't works. ----edit---- Doesn't work even I reinstall the

How can I add a native view from a Cordova plugin

大憨熊 提交于 2019-12-04 19:39:56
I am developing a plugin with the latest version of Cordova (3.3). I need to add a native UIImageView to the Cordova view. If I have access to the project for example in the platform folder, I can add my view to the view instance belonging to CDVViewController . However, I am not sure how to access that reference from a plugin. Inside my plugin I have: @interface CDVCool : CDVPlugin @property (weak, nonatomic) UIImageView *nativeImageView; ... @end How can I initialize and render this view by modifying only the plugin files? Credit for this answer goes to devgeeks who pointed me to a couple of