How to use non native plugins on Ionic?

If you’re unhappy with the performance or format support of the BarcodeScanner, before resorting to something as complicated as this “Scandit” seems to be, I would first suggest trying out ZBar.

My use case was just scanning a product barcode and then looking it up in a list products so the BarcodeScanner worked well. Wasn’t aware of ZBar at the time, thanks for the tip @rapropos.

When you declare the Scandit variable in your component it allows you to access the plugin class and all it’s members from that component, see the other posts above, that’s where I got the idea from originally.

Thank you very much … this worked for me … I was trying to use Exoplayer plugin in ionic 2 project.

I checked the plugin.xml file under the directory


Found below lines in plugin.xml:

Added the variable as below in my page:

import { Component } from ‘@angular/core’;
import { NavController } from ‘ionic-angular’;

declare var ExoPlayer : any;

selector: ‘page-home’,
templateUrl: ‘home.html’
export class HomePage {

constructor(public navCtrl: NavController) {


ionViewDidLoad() {

let successCallback = function (json) {

let errorCallback = function (error) {

let params = {
  url: ",fmp4_sd_hd_clear&sparams=ip,ipbits,expire,source,id,as&ip="
};, successCallback, errorCallback);



And it worked perfectly

Thanks again for the advice :slight_smile:

Note: it works on device or emulator … but I tried it in browser (using ionic run browser) but it did not work

@moama71 no worries, glad to have helped :slight_smile:

I’m still trying to get WifiWizard working but I cannot call any method on this object. I’ve installed it and tried different things (changing package.json and so on) but with no positive result. Can you help?

Hello, I’m trying to import noxa ionic3, and I’m not successful.
I realize that the plugin I am trying to import does not exist anything about will this be the problem?
Follow the plugin, thank you.

this is a guide to how plugin gets created pulgin creation
If you get to know how it is built you can easily use it without any doubt

you can declare something like to remove some compile errors
declare var window : { <your plugin name that you specified in plugin.xml -> clobber->target> : any }

this worked for me
basically, you have to know how it works to use it
see how it is configured and used do the same thing with whichever plugin you are using

Hi All,

I have been looking to use cordova plugin which was not exposed via ionic-native wrapper. I found following command “console.dir(window)”, I used this to dump complete window object and found that some plugins are at (<any>window).plugin, some are at (<any>window).plugins, some are at (<any>window).cordova

I recommend dumping the window object for finding plugin path and then calling functions via proper object structure. It worked for me.

1 Like

This worked me, thanks!

ionic info:

@ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 7.1.0
local packages:
@ionic/app-scripts : 3.1.8
Cordova Platforms : android 7.1.0 browser 5.0.3 ios 4.5.4
Ionic Framework : ionic-angular 3.9.2
Android SDK Tools : 26.1.1
ios-deploy : 1.9.2
ios-sim : 6.1.2
Node : v9.8.0
npm : 5.8.0
OS : macOS High Sierra
Xcode : Xcode 9.3 Build version 9E145
Environment Variables:
ANDROID_HOME : /Users/**/Library/Android/sdk
backend : pro

No worries! :slight_smile:

Is it working ? I am trying to work with ionic 3 , and I am not able to even import, I dont get what is the issue

Have you update wifiwizard & How have you updated That