<?xml version="1.0" encoding="UTF-8" ?>
<!--
  Copyright (c) 2013 The Chromium Authors. All rights reserved.
  Use of this source code is governed by a BSD-style license that can be
  found in the LICENSE file.
-->
<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
    id="org.chromium.alarms"
    version="1.0.0">
  <engines>
    <engine name="cordova" version=">=3.0.0" />
  </engines>

  <name>Chrome Apps Alarms API</name>

  <dependency id="org.chromium.common" />
  <dependency id="org.chromium.storage" />

  <js-module src="alarms.js" name="Alarms">
    <clobbers target="chrome.alarms" />
  </js-module>

  <platform name="android">
    <source-file src="src/android/ChromeAlarms.java" target-dir="src/org/chromium" />
    <source-file src="src/android/AlarmReceiver.java" target-dir="src/org/chromium" />
    <source-file src="src/android/Alarm.java" target-dir="src/org/chromium" />

    <config-file target="res/xml/config.xml" parent="/widget">
      <feature name="ChromeAlarms">
        <param name="android-package" value="org.chromium.ChromeAlarms"/>
        <param name="onload" value="true" />
      </feature>
    </config-file>
    <config-file target="AndroidManifest.xml" parent="/manifest/application">
      <receiver android:name="org.chromium.AlarmReceiver" />
    </config-file>
  </platform>
</plugin>
