<?xml version="1.0" encoding="UTF-8"?>

<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
           id="com.whamads.nativecamera"
      version="0.1.9">
    <name>Whamads Native Camera</name>

    <js-module src="www/CameraConstants.js" name="Camera">
        <clobbers target="Camera" />
    </js-module>

    <js-module src="www/CameraPopoverOptions.js" name="CameraPopoverOptions">
        <clobbers target="CameraPopoverOptions" />
    </js-module>

    <js-module src="www/Camera.js" name="camera">
        <clobbers target="navigator.camera" />
    </js-module>

    <!-- android -->
    <platform name="android">
        <config-file target="res/xml/config.xml" parent="/*">
            <feature name="Camera">
                <param name="android-package" value="com.whamads.nativecamera.NativeCameraLauncher"/>
            </feature>
        </config-file>

        <config-file target="AndroidManifest.xml" parent="/*">
            <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
            <uses-permission android:name="android.permission.CAMERA" />
            <uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
        </config-file>

        <config-file target="AndroidManifest.xml" parent="/manifest/application">
            <activity
                android:label="nativecameraplugin"
                android:name="com.whamads.nativecamera.CameraActivity"
                android:screenOrientation="portrait"
                android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
            </activity>
        </config-file>

        <source-file src="src/android/CameraActivity.java" target-dir="src/com/whamads/nativecameraplugin" />
        <source-file src="src/android/NativeCameraLauncher.java" target-dir="src/com/whamads/nativecameraplugin" />
        <source-file src="src/android/ExifHelper.java" target-dir="src/com/whamads/nativecameraplugin" />
        <source-file src="src/android/nativecameraplugin.xml" target-dir="res/layout" />
        <source-file src="res/btn_shot.png" target-dir="res/drawable" />
        <source-file src="res/btn_flip.png" target-dir="res/drawable" />
        <source-file src="res/btn_flash_on.png" target-dir="res/drawable" />
        <source-file src="res/btn_flash_no.png" target-dir="res/drawable" />
        <source-file src="res/btn_flash_auto.png" target-dir="res/drawable" />
        <source-file src="res/btn_gallery.png" target-dir="res/drawable" />
        <source-file src="res/btn_close.png" target-dir="res/drawable" />
        <source-file src="res/viewfinder.png" target-dir="res/drawable" />

        <js-module src="www/CameraPopoverHandle.js" name="CameraPopoverHandle">
            <clobbers target="CameraPopoverHandle" />
        </js-module>

     </platform>

</plugin>
