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

<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
        xmlns:android="http://schemas.android.com/apk/res/android"
        id="cordova-plugin-local-notifications-nn"
        version="0.8.2-r3">

    <name>LocalNotification</name>

    <description>The plugin supports scheduling local notifications in various ways with a single interface. It also allows you to update, clear or cancel them. There are different interfaces to query for local notifications and a complete set of events to hook into the life cycle of local notifications. To get a deep overview we recommend to read about all the topics in our wiki and try out the Kitchen Sink App</description>

    <repo>https://github.com/nnexai/cordova-plugin-local-notifications.git</repo>

    <keywords>appplant, notification, local notification</keywords>

    <license>Apache 2.0</license>

    <author>Sebastián Katzer</author>

    <!-- cordova -->
    <engines>
        <engine name="cordova" version=">=3.6.0" />
    </engines>

    <!-- dependencies -->
    <dependency id="cordova-plugin-device" />

    <!-- info -->
    <info>
        Your support is needed. If you use the local-notification plugin please support us in order to ensure further development.
        https://github.com/katzer/cordova-plugin-local-notifications#supporting

        Thank you!
    </info>

    <!-- js -->
    <js-module src="www/local-notification.js" name="LocalNotification">
        <clobbers target="cordova.plugins.notification.local" />
        <clobbers target="plugin.notification.local" />
    </js-module>

    <js-module src="www/local-notification-core.js" name="LocalNotification.Core">
        <clobbers target="cordova.plugins.notification.local.core" />
        <clobbers target="plugin.notification.local.core" />
    </js-module>

    <js-module src="www/local-notification-util.js" name="LocalNotification.Util">
        <merges target="cordova.plugins.notification.local.core" />
        <merges target="plugin.notification.local.core" />
    </js-module>

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

        <dependency id="de.appplant.cordova.common.registerusernotificationsettings" />

        <config-file target="config.xml" parent="/*">
            <feature name="LocalNotification">
                <param name="ios-package" value="APPLocalNotification" onload="true" />
                <param name="onload" value="true" />
            </feature>
        </config-file>

        <header-file src="src/ios/APPLocalNotification.h" />
        <source-file src="src/ios/APPLocalNotification.m" />

        <header-file src="src/ios/APPLocalNotificationOptions.h" />
        <source-file src="src/ios/APPLocalNotificationOptions.m" />

        <header-file src="src/ios/UIApplication+APPLocalNotification.h" />
        <source-file src="src/ios/UIApplication+APPLocalNotification.m" />

        <header-file src="src/ios/UILocalNotification+APPLocalNotification.h" />
        <source-file src="src/ios/UILocalNotification+APPLocalNotification.m" />

    </platform>

    <!-- android -->
    <platform name="android">
        <dependency id="android.support.v13" url="https://github.com/nnexai/cordova-plugin-android-support-v13.git"/>

        <config-file target="res/xml/config.xml" parent="/*">
            <feature name="LocalNotification">
                <param name="android-package" value="de.appplant.cordova.plugin.localnotification.LocalNotification"/>
            </feature>
        </config-file>

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

            <receiver
                android:name="de.appplant.cordova.plugin.localnotification.TriggerReceiver"
                android:exported="false" />

            <receiver
                android:name="de.appplant.cordova.plugin.localnotification.ClearReceiver"
                android:exported="false" />

            <activity
                android:name="de.appplant.cordova.plugin.localnotification.ClickActivity"
                android:launchMode="singleInstance"
                android:theme="@android:style/Theme.NoDisplay"
                android:exported="false" />

            <receiver
                android:name="de.appplant.cordova.plugin.notification.TriggerReceiver"
                android:exported="false" />

            <receiver
                android:name="de.appplant.cordova.plugin.notification.ClearReceiver"
                android:exported="false" />

            <receiver android:name="de.appplant.cordova.plugin.localnotification.RestoreReceiver" android:exported="false" >
                <intent-filter>
                    <action android:name="android.intent.action.BOOT_COMPLETED" />
                </intent-filter>
            </receiver>

            <activity
                android:name="de.appplant.cordova.plugin.notification.ClickActivity"
                android:launchMode="singleInstance"
                android:theme="@android:style/Theme.NoDisplay"
                android:exported="false" />

        </config-file>

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

        <source-file
            src="src/android/LocalNotification.java"
            target-dir="src/de/appplant/cordova/plugin/localnotification" />

        <source-file
            src="src/android/TriggerReceiver.java"
            target-dir="src/de/appplant/cordova/plugin/localnotification" />

        <source-file
            src="src/android/ClickActivity.java"
            target-dir="src/de/appplant/cordova/plugin/localnotification" />

        <source-file
            src="src/android/ClearReceiver.java"
            target-dir="src/de/appplant/cordova/plugin/localnotification" />

        <source-file
            src="src/android/RestoreReceiver.java"
            target-dir="src/de/appplant/cordova/plugin/localnotification" />

        <source-file
            src="src/android/notification/AbstractClearReceiver.java"
            target-dir="src/de/appplant/cordova/plugin/notification" />

        <source-file
            src="src/android/notification/AbstractClickActivity.java"
            target-dir="src/de/appplant/cordova/plugin/notification" />

        <source-file
            src="src/android/notification/AbstractRestoreReceiver.java"
            target-dir="src/de/appplant/cordova/plugin/notification" />

        <source-file
            src="src/android/notification/AbstractTriggerReceiver.java"
            target-dir="src/de/appplant/cordova/plugin/notification" />

        <source-file
            src="src/android/notification/AssetUtil.java"
            target-dir="src/de/appplant/cordova/plugin/notification" />

        <source-file
            src="src/android/notification/Builder.java"
            target-dir="src/de/appplant/cordova/plugin/notification" />

        <source-file
            src="src/android/notification/ClearReceiver.java"
            target-dir="src/de/appplant/cordova/plugin/notification" />

        <source-file
            src="src/android/notification/ClickActivity.java"
            target-dir="src/de/appplant/cordova/plugin/notification" />

        <source-file
            src="src/android/notification/Manager.java"
            target-dir="src/de/appplant/cordova/plugin/notification" />

        <source-file
            src="src/android/notification/Notification.java"
            target-dir="src/de/appplant/cordova/plugin/notification" />

        <source-file
            src="src/android/notification/Options.java"
            target-dir="src/de/appplant/cordova/plugin/notification" />

        <source-file
            src="src/android/notification/TriggerReceiver.java"
            target-dir="src/de/appplant/cordova/plugin/notification" />

    </platform>

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

        <js-module src="src/windows/LocalNotificationProxy.js" name="LocalNotification.Proxy" >
            <merges target="" />
        </js-module>

        <js-module src="src/windows/LocalNotificationCore.js" name="LocalNotification.Proxy.Core" >
            <merges target="" />
        </js-module>

        <js-module src="src/windows/LocalNotificationUtil.js" name="LocalNotification.Proxy.Util" >
            <merges target="" />
        </js-module>

        <!-- Platform Hooks -->
        <hook type="after_platform_add" src="scripts/windows/setToastCapable.js" />
        <hook type="after_plugin_install" src="scripts/windows/setToastCapable.js" />

        <hook type="after_platform_add" src="scripts/windows/broadcastActivateEvent.js" />
        <hook type="after_plugin_install" src="scripts/windows/broadcastActivateEvent.js" />
        <hook type="after_prepare" src="scripts/windows/broadcastActivateEvent.js" />

    </platform>

</plugin>
