<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
        xmlns:android="http://schemas.android.com/apk/res/android"
        id="manateeworks-barcodescanner-fork"
        version="1.9.4">
    <name>MWBarcodeScanner</name>
    <description>Manatee Works Barcode Scanner Plugin</description>
    <license>MIT</license>
    <keywords>phonegap,barcode</keywords>


    <js-module src="www/MWBScanner.js" name="Scanner">
        <clobbers target="scanner"/>
    </js-module>
    <asset src="www/MWBScanner.js" target="js/MWBScanner.js"/>


    <dependency id="cordova-plugin-dialogs"/>
    <dependency id="cordova-plugin-device"/>

    <!-- android -->
    <platform name="android">

        <config-file target="res/xml/config.xml" parent="/*">
            <preference name="CrosswalkAnimatable" value="true"/>
            <feature name="MWBarcodeScanner">
                <param name="android-package" value="com.manateeworks.BarcodeScannerPlugin"/>
            </feature>
        </config-file>


        <config-file target="AndroidManifest.xml" parent="/manifest/application">

            <activity android:name="com.manateeworks.ScannerActivity"
                      android:configChanges="orientation|keyboardHidden"
                      android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
            </activity>
        </config-file>

        <config-file target="AndroidManifest.xml" parent="/manifest">
            <uses-permission android:name="android.permission.CAMERA"/>
            <uses-permission android:name="android.permission.INTERNET"/>

        </config-file>


        <lib-file src="src/android/libs/mwbscanner.jar"/>

        <!-- For cordova-android 7.x -->
        <resource-file src="src/android/src/com/manateeworks/BarcodeScannerPlugin.java" target="java/com/manateeworks/BarcodeScannerPlugin.java"/>
        <resource-file src="src/android/src/com/manateeworks/ScannerActivity.java" target="java/com/manateeworks/ScannerActivity.java"/>

        <!-- For cordova-android 6.x -->
        <resource-file src="src/android/src/com/manateeworks/BarcodeScannerPlugin.java" target="src/com/manateeworks/BarcodeScannerPlugin.java"/>
        <resource-file src="src/android/src/com/manateeworks/ScannerActivity.java" target="src/com/manateeworks/ScannerActivity.java"/>

        <resource-file src="src/android/res/layout/scanner.xml" target="res/layout/scanner.xml"/>
        <resource-file src="src/android/res/drawable/overlay_mw.png" target="res/drawable/overlay_mw.png"/>
        <resource-file src="src/android/res/drawable-hdpi/overlay_mw.png" target="res/drawable-hdpi/overlay_mw.png"/>
        <resource-file src="src/android/res/drawable/flashbuttonoff.png" target="res/drawable/flashbuttonoff.png"/>
        <resource-file src="src/android/res/drawable/flashbuttonon.png" target="res/drawable/flashbuttonon.png"/>
        <resource-file src="src/android/res/drawable/zoom.png" target="res/drawable/zoom.png"/>

        <!-- For cordova-android 6.x -->
        <resource-file src="src/android/libs/armeabi/libBarcodeScannerLib.so" target="libs/armeabi/libBarcodeScannerLib.so"/>
        <resource-file src="src/android/libs/x86/libBarcodeScannerLib.so" target="libs/x86/libBarcodeScannerLib.so"/>
        <resource-file src="src/android/libs/armeabi-v7a/libBarcodeScannerLib.so" target="libs/armeabi-v7a/libBarcodeScannerLib.so"/>
        <resource-file src="src/android/libs/arm64-v8a/libBarcodeScannerLib.so" target="libs/arm64-v8a/libBarcodeScannerLib.so"/>
        <resource-file src="src/android/libs/mips/libBarcodeScannerLib.so" target="libs/mips/libBarcodeScannerLib.so"/>

        <!-- For cordova-android 7.x -->
        <resource-file src="src/android/libs/armeabi/libBarcodeScannerLib.so" target="jniLibs/armeabi/libBarcodeScannerLib.so"/>
        <resource-file src="src/android/libs/x86/libBarcodeScannerLib.so" target="jniLibs/x86/libBarcodeScannerLib.so"/>
        <resource-file src="src/android/libs/armeabi-v7a/libBarcodeScannerLib.so" target="jniLibs/armeabi-v7a/libBarcodeScannerLib.so"/>
        <resource-file src="src/android/libs/arm64-v8a/libBarcodeScannerLib.so" target="jniLibs/arm64-v8a/libBarcodeScannerLib.so"/>
        <resource-file src="src/android/libs/mips/libBarcodeScannerLib.so" target="jniLibs/mips/libBarcodeScannerLib.so"/>


    </platform>

    <!-- ios -->
    <platform name="ios">


        <config-file target="config.xml" parent="/*">
            <feature name="MWBarcodeScanner">
                <param name="ios-package" value="CDVMWBarcodeScanner"/>
            </feature>
        </config-file>

        <framework src="CoreVideo.framework" weak="false"/>
        <framework src="CoreGraphics.framework" weak="false"/>
        <framework src="QuartzCore.framework" weak="false"/>
        <framework src="CoreLocation.framework" weak="false"/>

        <header-file src="src/ios/CDVMWBarcodeScanner.h" target-dir="MWBarcodeScanner"/>
        <source-file src="src/ios/CDVMWBarcodeScanner.m" target-dir="MWBarcodeScanner"/>
        <header-file src="src/ios/MWBarcodeScanner/BarcodeScanner.h" target-dir="MWBarcodeScanner"/>
        <header-file src="src/ios/MWBarcodeScanner/MWScannerViewController.h" target-dir="MWBarcodeScanner"/>
        <source-file src="src/ios/MWBarcodeScanner/MWScannerViewController.m" target-dir="MWBarcodeScanner"/>
        <header-file src="src/ios/MWBarcodeScanner/MWOverlay.h" target-dir="MWBarcodeScanner"/>
        <source-file src="src/ios/MWBarcodeScanner/MWOverlay.m" target-dir="MWBarcodeScanner"/>
        <header-file src="src/ios/MWBarcodeScanner/MWResult.h" target-dir="MWBarcodeScanner"/>
        <source-file src="src/ios/MWBarcodeScanner/MWParser.h" target-dir="MWBarcodeScanner"/>
        <source-file src="src/ios/MWBarcodeScanner/MWScannerViewController.xib" target-dir="MWBarcodeScanner"/>
        <source-file src="src/ios/MWBarcodeScanner/libBarcodeScanner.a" target-dir="MWBarcodeScanner" framework="true"/>

        <resource-file src="src/ios/MWBarcodeScanner/close_button.png" target-dir="MWBarcodeScanner"/>
        <resource-file src="src/ios/MWBarcodeScanner/flashbuttonon.png" target-dir="MWBarcodeScanner"/>
        <resource-file src="src/ios/MWBarcodeScanner/flashbuttonoff.png" target-dir="MWBarcodeScanner"/>
        <resource-file src="src/ios/MWBarcodeScanner/overlay_mw.png" target-dir="MWBarcodeScanner"/>
        <resource-file src="src/ios/MWBarcodeScanner/overlay_mw@2x.png" target-dir="MWBarcodeScanner"/>
        <resource-file src="src/ios/MWBarcodeScanner/zoom.png" target-dir="MWBarcodeScanner"/>

    </platform>

    <!-- wp8 -->
    <platform name="wp8">

        <config-file target="config.xml" parent="/*">
            <feature name="MWBarcodeScanner">
                <param name="wp-package" value="MWBarcodeScanner"/>
            </feature>
        </config-file>

        <config-file target="Properties/WMAppManifest.xml" parent="/Deployment/App/Capabilities">
            <Capability Name="ID_CAP_ISV_CAMERA"/>
        </config-file>


        <source-file src="src/wp8/MWBarcodeScanner/MWBarcodeScanner.cs"/>
        <source-file src="src/wp8/MWBarcodeScanner/BarcodeHelper.cs"/>
        <source-file src="src/wp8/MWBarcodeScanner/ScannerPage.xaml.cs"/>
        <source-file src="src/wp8/MWBarcodeScanner/ScannerPage.xaml"/>
        <source-file src="src/wp8/MWBarcodeScanner/MWOverlay.cs"/>
        <source-file src="src/wp8/MWBarcodeScanner/overlay_mw.png"/>
        <source-file src="src/wp8/MWBarcodeScanner/flashbuttonon.png"/>
        <source-file src="src/wp8/MWBarcodeScanner/flashbuttonoff.png"/>
        <source-file src="src/wp8/MWBarcodeScanner/zoom.png"/>


        <source-file src="src/wp8/BarcodeLib.winmd" framework="true"/>
        <source-file src="src/wp8/BarcodeLib.dll"/>
        <framework src="src/wp8/BarcodeLib.winmd"/>
        <source-file src="src/wp8/WBEx/WriteableBitmapExWinPhone.dll" framework="true"/>
        <framework src="src/wp8/WBEx/WriteableBitmapExWinPhone.dll"/>
        <source-file src="src/wp8/WBEx/WriteableBitmapExWinPhoneXnaDependant.dll" framework="true"/>
        <source-file src="src/wp8/WBEx/WriteableBitmapExWinPhone.pdb"/>
        <source-file src="src/wp8/WBEx/WriteableBitmapExWinPhoneXnaDependant.pdb"/>
        <source-file src="src/wp8/WBEx/WriteableBitmapExWinPhone.XML"/>
        <source-file src="src/wp8/WBEx/WriteableBitmapExWinPhoneXnaDependant.XML"/>


    </platform>


</plugin>
