Commit b7115bb4 by Sebastián Katzer

Update project

parent e27ee89f
...@@ -37,18 +37,28 @@ ...@@ -37,18 +37,28 @@
<file leaf-file-name="LocalNotification.java" pinned="false" current="true" current-in-tab="true"> <file leaf-file-name="LocalNotification.java" pinned="false" current="true" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/localnotification/LocalNotification.java"> <entry file="file://$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/localnotification/LocalNotification.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="420" max-vertical-offset="7515"> <state vertical-scroll-proportion="0.0" vertical-offset="6450" max-vertical-offset="8535">
<caret line="63" column="14" selection-start-line="63" selection-start-column="14" selection-end-line="63" selection-end-column="14" /> <caret line="465" column="0" selection-start-line="465" selection-start-column="0" selection-end-line="465" selection-end-column="0" />
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
<file leaf-file-name="CordovaPlugin.java" pinned="false" current="false" current-in-tab="false"> <file leaf-file-name="Manager.java" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/platforms/android/CordovaLib/src/org/apache/cordova/CordovaPlugin.java"> <entry file="file://$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/notification/Manager.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="735" max-vertical-offset="3555"> <state vertical-scroll-proportion="0.0" vertical-offset="4905" max-vertical-offset="6930">
<caret line="49" column="36" selection-start-line="49" selection-start-column="36" selection-end-line="49" selection-end-column="36" /> <caret line="327" column="17" selection-start-line="0" selection-start-column="0" selection-end-line="456" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Notification.java" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/notification/Notification.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="690" max-vertical-offset="5610">
<caret line="46" column="28" selection-start-line="0" selection-start-column="0" selection-end-line="368" selection-end-column="0" />
<folding /> <folding />
</state> </state>
</provider> </provider>
...@@ -76,13 +86,10 @@ ...@@ -76,13 +86,10 @@
<option value="$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/localnotification/Receiver.java" /> <option value="$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/localnotification/Receiver.java" />
<option value="$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/notification/Builder.java" /> <option value="$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/notification/Builder.java" />
<option value="$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/notification/Options.java" /> <option value="$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/notification/Options.java" />
<option value="$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/notification/Notification.java" />
<option value="$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/notification/Manager.java" />
<option value="$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/notification/ClearReceiver.java" /> <option value="$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/notification/ClearReceiver.java" />
<option value="$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/notification/AbstractClearReceiver.java" /> <option value="$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/notification/AbstractClearReceiver.java" />
<option value="$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/notification/AbstractClickActivity.java" /> <option value="$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/notification/AbstractClickActivity.java" />
<option value="$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/notification/AbstractTriggerReceiver.java" /> <option value="$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/notification/AbstractTriggerReceiver.java" />
<option value="$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/notification/AssetUtil.java" />
<option value="$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/notification/ClickActivity.java" /> <option value="$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/notification/ClickActivity.java" />
<option value="$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/notification/TriggerReceiver.java" /> <option value="$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/notification/TriggerReceiver.java" />
<option value="$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/localnotification/ClearReceiver.java" /> <option value="$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/localnotification/ClearReceiver.java" />
...@@ -92,8 +99,11 @@ ...@@ -92,8 +99,11 @@
<option value="$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/notification/AbstractRestoreReceiver.java" /> <option value="$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/notification/AbstractRestoreReceiver.java" />
<option value="$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/notification/RestoreReceiver.java" /> <option value="$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/notification/RestoreReceiver.java" />
<option value="$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/localnotification/RestoreReceiver.java" /> <option value="$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/localnotification/RestoreReceiver.java" />
<option value="$PROJECT_DIR$/platforms/android/AndroidManifest.xml" />
<option value="$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/localnotification/ClickActivity.java" /> <option value="$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/localnotification/ClickActivity.java" />
<option value="$PROJECT_DIR$/platforms/android/AndroidManifest.xml" />
<option value="$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/notification/AssetUtil.java" />
<option value="$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/notification/Notification.java" />
<option value="$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/notification/Manager.java" />
<option value="$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/localnotification/LocalNotification.java" /> <option value="$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/localnotification/LocalNotification.java" />
</list> </list>
</option> </option>
...@@ -129,112 +139,36 @@ ...@@ -129,112 +139,36 @@
<sortByType /> <sortByType />
</navigator> </navigator>
<panes> <panes>
<pane id="ProjectPane"> <pane id="Scope" />
<pane id="AndroidView">
<subPane> <subPane>
<PATH> <PATH>
<PATH_ELEMENT> <PATH_ELEMENT>
<option name="myItemId" value="cordova-example-local-notifications" /> <option name="myItemId" value="cordova-example-local-notifications" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> <option name="myItemType" value="com.android.tools.idea.navigator.nodes.AndroidViewProjectNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="cordova-example-local-notifications" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="android" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT> </PATH_ELEMENT>
</PATH> </PATH>
</subPane> </subPane>
</pane> </pane>
<pane id="PackagesPane" /> <pane id="PackagesPane" />
<pane id="Scope" /> <pane id="ProjectPane">
<pane id="AndroidView">
<subPane> <subPane>
<PATH> <PATH>
<PATH_ELEMENT> <PATH_ELEMENT>
<option name="myItemId" value="cordova-example-local-notifications" /> <option name="myItemId" value="cordova-example-local-notifications" />
<option name="myItemType" value="com.android.tools.idea.navigator.nodes.AndroidViewProjectNode" /> <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="android" />
<option name="myItemType" value="com.android.tools.idea.navigator.nodes.NonAndroidModuleNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="java" />
<option name="myItemType" value="com.android.tools.idea.navigator.nodes.NonAndroidSourceTypeNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="cordova-example-local-notifications" />
<option name="myItemType" value="com.android.tools.idea.navigator.nodes.AndroidViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="android" />
<option name="myItemType" value="com.android.tools.idea.navigator.nodes.NonAndroidModuleNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="java" />
<option name="myItemType" value="com.android.tools.idea.navigator.nodes.NonAndroidSourceTypeNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="plugin" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="notification" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="cordova-example-local-notifications" />
<option name="myItemType" value="com.android.tools.idea.navigator.nodes.AndroidViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="android" />
<option name="myItemType" value="com.android.tools.idea.navigator.nodes.NonAndroidModuleNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="java" />
<option name="myItemType" value="com.android.tools.idea.navigator.nodes.NonAndroidSourceTypeNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="plugin" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="localnotification" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT> </PATH_ELEMENT>
</PATH> </PATH>
<PATH> <PATH>
<PATH_ELEMENT> <PATH_ELEMENT>
<option name="myItemId" value="cordova-example-local-notifications" /> <option name="myItemId" value="cordova-example-local-notifications" />
<option name="myItemType" value="com.android.tools.idea.navigator.nodes.AndroidViewProjectNode" /> <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT> </PATH_ELEMENT>
<PATH_ELEMENT> <PATH_ELEMENT>
<option name="myItemId" value="android" /> <option name="myItemId" value="android" />
<option name="myItemType" value="com.android.tools.idea.navigator.nodes.NonAndroidModuleNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="java" />
<option name="myItemType" value="com.android.tools.idea.navigator.nodes.NonAndroidSourceTypeNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="plugin" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT> </PATH_ELEMENT>
</PATH> </PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="cordova-example-local-notifications" />
<option name="myItemType" value="com.android.tools.idea.navigator.nodes.AndroidViewProjectNode" />
</PATH_ELEMENT>
</PATH>
</subPane> </subPane>
</pane> </pane>
</panes> </panes>
...@@ -254,7 +188,7 @@ ...@@ -254,7 +188,7 @@
<property name="android.project.structure.proportion" value="0.15" /> <property name="android.project.structure.proportion" value="0.15" />
<property name="recentsLimit" value="5" /> <property name="recentsLimit" value="5" />
<property name="restartRequiresConfirmation" value="true" /> <property name="restartRequiresConfirmation" value="true" />
<property name="ANDROID_EXTENDED_DEVICE_CHOOSER_SERIALS" value="" /> <property name="ANDROID_EXTENDED_DEVICE_CHOOSER_SERIALS" value="TWPR9PJRFATWTSNR" />
<property name="ANDROID_EXTENDED_DEVICE_CHOOSER_AVD" value="Nexus_5_API_21" /> <property name="ANDROID_EXTENDED_DEVICE_CHOOSER_AVD" value="Nexus_5_API_21" />
<property name="FullScreen" value="false" /> <property name="FullScreen" value="false" />
</component> </component>
...@@ -403,21 +337,21 @@ ...@@ -403,21 +337,21 @@
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Build Variants" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" /> <window_info id="Build Variants" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
<window_info id="Gradle Console" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32900432" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" /> <window_info id="Gradle Console" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32900432" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32756132" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
<window_info id="Android" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.32756132" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> <window_info id="Android" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.32756132" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" /> <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.2532189" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.2532189" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.26752505" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.2532189" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32756132" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32756132" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Memory Monitor" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3997114" sideWeight="0.53648067" order="7" side_tool="true" content_ui="tabs" /> <window_info id="Memory Monitor" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3997114" sideWeight="0.53648067" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" /> <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" /> <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32756132" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32756132" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32756132" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" /> <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
</layout> </layout>
</component> </component>
...@@ -439,13 +373,103 @@ ...@@ -439,13 +373,103 @@
</component> </component>
<component name="XDebuggerManager"> <component name="XDebuggerManager">
<breakpoint-manager> <breakpoint-manager>
<option name="time" value="157" /> <breakpoints>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/notification/AssetUtil.java</url>
<line>292</line>
<properties />
<option name="timeStamp" value="169" />
</line-breakpoint>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/notification/AssetUtil.java</url>
<line>295</line>
<properties />
<option name="timeStamp" value="170" />
</line-breakpoint>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/notification/AssetUtil.java</url>
<line>298</line>
<properties />
<option name="timeStamp" value="171" />
</line-breakpoint>
</breakpoints>
<option name="time" value="191" />
</breakpoint-manager> </breakpoint-manager>
</component> </component>
<component name="editorHistoryManager"> <component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/localnotification/LocalNotification.java"> <entry file="file://$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/localnotification/LocalNotification.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="420" max-vertical-offset="7575"> <state vertical-scroll-proportion="0.0" vertical-offset="6450" max-vertical-offset="8535">
<caret line="465" column="0" selection-start-line="465" selection-start-column="0" selection-end-line="465" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/notification/Manager.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="4905" max-vertical-offset="6930">
<caret line="327" column="17" selection-start-line="0" selection-start-column="0" selection-end-line="456" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/notification/Notification.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="690" max-vertical-offset="5610">
<caret line="46" column="28" selection-start-line="0" selection-start-column="0" selection-end-line="368" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/localnotification/LocalNotification.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="6450" max-vertical-offset="8535">
<caret line="465" column="0" selection-start-line="465" selection-start-column="0" selection-end-line="465" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/notification/Manager.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="4905" max-vertical-offset="6930">
<caret line="327" column="17" selection-start-line="0" selection-start-column="0" selection-end-line="456" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/notification/Notification.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="690" max-vertical-offset="5610">
<caret line="46" column="28" selection-start-line="0" selection-start-column="0" selection-end-line="368" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/notification/AssetUtil.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="5100" max-vertical-offset="6015">
<caret line="131" column="14" selection-start-line="131" selection-start-column="14" selection-end-line="131" selection-end-column="14" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/notification/Options.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="2025" max-vertical-offset="4650">
<caret line="135" column="0" selection-start-line="135" selection-start-column="0" selection-end-line="135" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/notification/Builder.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="2010" max-vertical-offset="3000">
<caret line="134" column="22" selection-start-line="134" selection-start-column="22" selection-end-line="134" selection-end-column="22" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/localnotification/LocalNotification.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="420" max-vertical-offset="7515">
<caret line="63" column="14" selection-start-line="63" selection-start-column="14" selection-end-line="63" selection-end-column="14" /> <caret line="63" column="14" selection-start-line="63" selection-start-column="14" selection-end-line="63" selection-end-column="14" />
<folding /> <folding />
</state> </state>
...@@ -455,10 +479,24 @@ ...@@ -455,10 +479,24 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="735" max-vertical-offset="3555"> <state vertical-scroll-proportion="0.0" vertical-offset="735" max-vertical-offset="3555">
<caret line="49" column="36" selection-start-line="49" selection-start-column="36" selection-end-line="49" selection-end-column="36" /> <caret line="49" column="36" selection-start-line="49" selection-start-column="36" selection-end-line="49" selection-end-column="36" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/localnotification/LocalNotification.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="420" max-vertical-offset="7575">
<caret line="63" column="14" selection-start-line="63" selection-start-column="14" selection-end-line="63" selection-end-column="14" />
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/platforms/android/CordovaLib/src/org/apache/cordova/CordovaPlugin.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="735" max-vertical-offset="3555">
<caret line="49" column="36" selection-start-line="49" selection-start-column="36" selection-end-line="49" selection-end-column="36" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/localnotification/LocalNotification.java"> <entry file="file://$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/localnotification/LocalNotification.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="405" max-vertical-offset="7575"> <state vertical-scroll-proportion="0.0" vertical-offset="405" max-vertical-offset="7575">
...@@ -471,7 +509,6 @@ ...@@ -471,7 +509,6 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="735" max-vertical-offset="3555"> <state vertical-scroll-proportion="0.0" vertical-offset="735" max-vertical-offset="3555">
<caret line="49" column="36" selection-start-line="49" selection-start-column="36" selection-end-line="49" selection-end-column="36" /> <caret line="49" column="36" selection-start-line="49" selection-start-column="36" selection-end-line="49" selection-end-column="36" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
...@@ -487,7 +524,6 @@ ...@@ -487,7 +524,6 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="270" max-vertical-offset="3090"> <state vertical-scroll-proportion="0.0" vertical-offset="270" max-vertical-offset="3090">
<caret line="54" column="32" selection-start-line="54" selection-start-column="32" selection-end-line="54" selection-end-column="32" /> <caret line="54" column="32" selection-start-line="54" selection-start-column="32" selection-end-line="54" selection-end-column="32" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
...@@ -503,7 +539,6 @@ ...@@ -503,7 +539,6 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="270" max-vertical-offset="3090"> <state vertical-scroll-proportion="0.0" vertical-offset="270" max-vertical-offset="3090">
<caret line="54" column="32" selection-start-line="54" selection-start-column="32" selection-end-line="54" selection-end-column="32" /> <caret line="54" column="32" selection-start-line="54" selection-start-column="32" selection-end-line="54" selection-end-column="32" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
...@@ -521,14 +556,6 @@ ...@@ -521,14 +556,6 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/platforms/android/AndroidManifest.xml">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.43529412" vertical-offset="70" max-vertical-offset="495">
<caret line="17" column="76" selection-start-line="17" selection-start-column="76" selection-end-line="17" selection-end-column="76" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/notification/AbstractClickActivity.java"> <entry file="file://$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/notification/AbstractClickActivity.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-0.111872144" vertical-offset="199" max-vertical-offset="1230"> <state vertical-scroll-proportion="-0.111872144" vertical-offset="199" max-vertical-offset="1230">
...@@ -554,14 +581,58 @@ ...@@ -554,14 +581,58 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="255" max-vertical-offset="3090"> <state vertical-scroll-proportion="0.0" vertical-offset="255" max-vertical-offset="3090">
<caret line="49" column="36" selection-start-line="49" selection-start-column="36" selection-end-line="49" selection-end-column="36" /> <caret line="49" column="36" selection-start-line="49" selection-start-column="36" selection-end-line="49" selection-end-column="36" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/platforms/android/AndroidManifest.xml">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.72" vertical-offset="0" max-vertical-offset="495">
<caret line="18" column="60" selection-start-line="18" selection-start-column="60" selection-end-line="18" selection-end-column="60" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/notification/AssetUtil.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-8.561644" vertical-offset="5100" max-vertical-offset="6015">
<caret line="131" column="14" selection-start-line="131" selection-start-column="14" selection-end-line="131" selection-end-column="14" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/notification/Options.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="771" max-vertical-offset="3915">
<caret line="135" column="0" selection-start-line="135" selection-start-column="0" selection-end-line="135" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/notification/Builder.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="1296" max-vertical-offset="2565">
<caret line="134" column="22" selection-start-line="134" selection-start-column="22" selection-end-line="134" selection-end-column="22" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/notification/Notification.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="4965">
<caret line="46" column="28" selection-start-line="0" selection-start-column="0" selection-end-line="368" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/notification/Manager.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="4114" max-vertical-offset="6270">
<caret line="327" column="17" selection-start-line="0" selection-start-column="0" selection-end-line="456" selection-end-column="0" />
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/localnotification/LocalNotification.java"> <entry file="file://$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/localnotification/LocalNotification.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="420" max-vertical-offset="7575"> <state vertical-scroll-proportion="0.0" vertical-offset="6450" max-vertical-offset="8535">
<caret line="63" column="14" selection-start-line="63" selection-start-column="14" selection-end-line="63" selection-end-column="14" /> <caret line="465" column="0" selection-start-line="465" selection-start-column="0" selection-end-line="465" selection-end-column="0" />
<folding /> <folding />
</state> </state>
</provider> </provider>
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
</receiver> </receiver>
<activity android:exported="false" android:launchMode="singleInstance" android:name="de.appplant.cordova.plugin.notification.ClickActivity" android:theme="@android:style/Theme.NoDisplay" /> <activity android:exported="false" android:launchMode="singleInstance" android:name="de.appplant.cordova.plugin.notification.ClickActivity" android:theme="@android:style/Theme.NoDisplay" />
</application> </application>
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="21" /> <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="22" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
</manifest> </manifest>
...@@ -308,6 +308,7 @@ ...@@ -308,6 +308,7 @@
<!-- IDs --> <!-- IDs -->
<script type="text/javascript"> <script type="text/javascript">
var callbackIds = function (ids) { var callbackIds = function (ids) {
console.log(ids);
showToast(ids.length === 0 ? '- none -' : ids.join(' ,')); showToast(ids.length === 0 ? '- none -' : ids.join(' ,'));
}; };
...@@ -331,8 +332,13 @@ ...@@ -331,8 +332,13 @@
showToast(notifications.length === 0 ? '- none -' : notifications.join(' ,')); showToast(notifications.length === 0 ? '- none -' : notifications.join(' ,'));
}; };
var callbackSingleOpts = function (notification) {
console.log(notification);
showToast(notification.toString());
};
get = function () { get = function () {
cordova.plugins.notification.local.get(1, callbackOpts); cordova.plugins.notification.local.get(1, callbackSingleOpts);
}; };
getMultiple = function () { getMultiple = function () {
......
...@@ -275,7 +275,8 @@ exports.get = function () { ...@@ -275,7 +275,8 @@ exports.get = function () {
scope = args[2]; scope = args[2];
if (!Array.isArray(ids)) { if (!Array.isArray(ids)) {
ids = [ids]; this.exec('getSingle', ids.toString(), callback, scope);
return;
} }
ids = this.convertIds(ids); ids = this.convertIds(ids);
...@@ -321,6 +322,11 @@ exports.getScheduled = function () { ...@@ -321,6 +322,11 @@ exports.getScheduled = function () {
ids = [ids]; ids = [ids];
} }
if (!Array.isArray(ids)) {
this.exec('getSingleScheduled', ids.toString(), callback, scope);
return;
}
ids = this.convertIds(ids); ids = this.convertIds(ids);
this.exec('getScheduled', ids, callback, scope); this.exec('getScheduled', ids, callback, scope);
...@@ -364,6 +370,11 @@ exports.getTriggered = function () { ...@@ -364,6 +370,11 @@ exports.getTriggered = function () {
ids = [ids]; ids = [ids];
} }
if (!Array.isArray(ids)) {
this.exec('getSingleTriggered', ids.toString(), callback, scope);
return;
}
ids = this.convertIds(ids); ids = this.convertIds(ids);
this.exec('getTriggered', ids, callback, scope); this.exec('getTriggered', ids, callback, scope);
......
...@@ -174,6 +174,15 @@ public class LocalNotification extends CordovaPlugin { ...@@ -174,6 +174,15 @@ public class LocalNotification extends CordovaPlugin {
else if (action.equals("getTriggeredIds")) { else if (action.equals("getTriggeredIds")) {
getTriggeredIds(command); getTriggeredIds(command);
} }
else if (action.equals("getSingle")) {
getSingle(args, command);
}
else if (action.equals("getSingleScheduled")) {
getSingleScheduled(args, command);
}
else if (action.equals("getSingleTriggered")) {
getSingleTriggered(args, command);
}
else if (action.equals("getAll")) { else if (action.equals("getAll")) {
getAll(args, command); getAll(args, command);
} }
...@@ -369,23 +378,51 @@ public class LocalNotification extends CordovaPlugin { ...@@ -369,23 +378,51 @@ public class LocalNotification extends CordovaPlugin {
} }
/** /**
* Set of options from local notification. * Options from local notification.
* *
* @param ids * @param ids
* Set of local notification IDs * Set of local notification IDs
* @param command * @param command
* The callback context used when calling back into JavaScript. * The callback context used when calling back into JavaScript.
*/ */
private void getAll (JSONArray ids, CallbackContext command) { private void getSingle (JSONArray ids, CallbackContext command) {
List<JSONObject> options; getOptions(ids.optString(0), Notification.Type.ALL, command);
}
if (ids.length() == 0) { /**
options = getNotificationMgr().getOptions(); * Options from scheduled notification.
} else { *
options = getNotificationMgr().getOptionsById(toList(ids)); * @param ids
* Set of local notification IDs
* @param command
* The callback context used when calling back into JavaScript.
*/
private void getSingleScheduled (JSONArray ids, CallbackContext command) {
getOptions(ids.optString(0), Notification.Type.SCHEDULED, command);
} }
command.success(new JSONArray(options)); /**
* Options from triggered notification.
*
* @param ids
* Set of local notification IDs
* @param command
* The callback context used when calling back into JavaScript.
*/
private void getSingleTriggered (JSONArray ids, CallbackContext command) {
getOptions(ids.optString(0), Notification.Type.TRIGGERED, command);
}
/**
* Set of options from local notification.
*
* @param ids
* Set of local notification IDs
* @param command
* The callback context used when calling back into JavaScript.
*/
private void getAll (JSONArray ids, CallbackContext command) {
getOptions(ids, Notification.Type.ALL, command);
} }
/** /**
...@@ -397,34 +434,61 @@ public class LocalNotification extends CordovaPlugin { ...@@ -397,34 +434,61 @@ public class LocalNotification extends CordovaPlugin {
* The callback context used when calling back into JavaScript. * The callback context used when calling back into JavaScript.
*/ */
private void getScheduled (JSONArray ids, CallbackContext command) { private void getScheduled (JSONArray ids, CallbackContext command) {
List<JSONObject> options; getOptions(ids, Notification.Type.SCHEDULED, command);
}
if (ids.length() == 0) { /**
options = getNotificationMgr().getOptionsByType(Notification.Type.SCHEDULED); * Set of options from triggered notifications.
} else { *
options = getNotificationMgr().getOptionsBy( * @param ids
Notification.Type.SCHEDULED, toList(ids)); * Set of local notification IDs
* @param command
* The callback context used when calling back into JavaScript.
*/
private void getTriggered (JSONArray ids, CallbackContext command) {
getOptions(ids, Notification.Type.TRIGGERED, command);
} }
command.success(new JSONArray(options)); /**
* Options from local notification.
*
* @param id
* Set of local notification IDs
* @param type
* The local notification life cycle type
* @param command
* The callback context used when calling back into JavaScript.
*/
private void getOptions (String id, Notification.Type type,
CallbackContext command) {
JSONArray ids = new JSONArray().put(id);
JSONObject options =
getNotificationMgr().getOptionsBy(type, toList(ids)).get(0);
command.success(options);
} }
/** /**
* Set of options from triggered notifications. * Set of options from local notifications.
* *
* @param ids * @param ids
* Set of local notification IDs * Set of local notification IDs
* @param type
* The local notification life cycle type
* @param command * @param command
* The callback context used when calling back into JavaScript. * The callback context used when calling back into JavaScript.
*/ */
private void getTriggered (JSONArray ids, CallbackContext command) { private void getOptions (JSONArray ids, Notification.Type type,
CallbackContext command) {
List<JSONObject> options; List<JSONObject> options;
if (ids.length() == 0) { if (ids.length() == 0) {
options = getNotificationMgr().getOptionsByType(Notification.Type.TRIGGERED); options = getNotificationMgr().getOptionsByType(type);
} else { } else {
options = getNotificationMgr().getOptionsBy( options = getNotificationMgr().getOptionsBy(type, toList(ids));
Notification.Type.TRIGGERED, toList(ids));
} }
command.success(new JSONArray(options)); command.success(new JSONArray(options));
......
...@@ -256,6 +256,9 @@ public class Manager { ...@@ -256,6 +256,9 @@ public class Manager {
List<Notification> notifications = getAll(); List<Notification> notifications = getAll();
ArrayList<Notification> list = new ArrayList<Notification>(); ArrayList<Notification> list = new ArrayList<Notification>();
if (type == Notification.Type.ALL)
return notifications;
for (Notification notification : notifications) { for (Notification notification : notifications) {
if (notification.getType() == type) { if (notification.getType() == type) {
list.add(notification); list.add(notification);
...@@ -368,6 +371,9 @@ public class Manager { ...@@ -368,6 +371,9 @@ public class Manager {
public List<JSONObject> getOptionsBy(Notification.Type type, public List<JSONObject> getOptionsBy(Notification.Type type,
List<Integer> ids) { List<Integer> ids) {
if (type == Notification.Type.ALL)
return getOptionsById(ids);
ArrayList<JSONObject> options = new ArrayList<JSONObject>(); ArrayList<JSONObject> options = new ArrayList<JSONObject>();
List<Notification> notifications = getByIds(ids); List<Notification> notifications = getByIds(ids);
......
...@@ -46,7 +46,7 @@ public class Notification { ...@@ -46,7 +46,7 @@ public class Notification {
// Used to differ notifications by their life cycle state // Used to differ notifications by their life cycle state
public static enum Type { public static enum Type {
SCHEDULED, TRIGGERED ALL, SCHEDULED, TRIGGERED
} }
// Default receiver to handle the trigger event // Default receiver to handle the trigger event
......
...@@ -27,6 +27,8 @@ ...@@ -27,6 +27,8 @@
30B4F30219D5E07200D9F7D8 /* Default-Landscape-736h.png in Resources */ = {isa = PBXBuildFile; fileRef = 30B4F2FF19D5E07200D9F7D8 /* Default-Landscape-736h.png */; }; 30B4F30219D5E07200D9F7D8 /* Default-Landscape-736h.png in Resources */ = {isa = PBXBuildFile; fileRef = 30B4F2FF19D5E07200D9F7D8 /* Default-Landscape-736h.png */; };
30C1856619D5FC0A00212699 /* icon-60@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 30C1856519D5FC0A00212699 /* icon-60@3x.png */; }; 30C1856619D5FC0A00212699 /* icon-60@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 30C1856519D5FC0A00212699 /* icon-60@3x.png */; };
30FC414916E50CA1004E6F35 /* icon-72@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 30FC414816E50CA1004E6F35 /* icon-72@2x.png */; }; 30FC414916E50CA1004E6F35 /* icon-72@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 30FC414816E50CA1004E6F35 /* icon-72@2x.png */; };
345E79E8B29A4BC0911A1AD9 /* Toast.m in Sources */ = {isa = PBXBuildFile; fileRef = 73FFCCD6DE0C4F41A5CD8A42 /* Toast.m */; };
3EC215006CC74A65BB090187 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 47EB2B35CA524D62A59BD0CD /* QuartzCore.framework */; };
5B1594DD16A7569C00FEF299 /* AssetsLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5B1594DC16A7569C00FEF299 /* AssetsLibrary.framework */; }; 5B1594DD16A7569C00FEF299 /* AssetsLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5B1594DC16A7569C00FEF299 /* AssetsLibrary.framework */; };
7E7966DE1810823500FA85AD /* icon-40.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E7966D41810823500FA85AD /* icon-40.png */; }; 7E7966DE1810823500FA85AD /* icon-40.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E7966D41810823500FA85AD /* icon-40.png */; };
7E7966DF1810823500FA85AD /* icon-40@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E7966D51810823500FA85AD /* icon-40@2x.png */; }; 7E7966DF1810823500FA85AD /* icon-40@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E7966D51810823500FA85AD /* icon-40@2x.png */; };
...@@ -38,15 +40,12 @@ ...@@ -38,15 +40,12 @@
7E7966E51810823500FA85AD /* icon-76@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E7966DB1810823500FA85AD /* icon-76@2x.png */; }; 7E7966E51810823500FA85AD /* icon-76@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E7966DB1810823500FA85AD /* icon-76@2x.png */; };
7E7966E61810823500FA85AD /* icon-small.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E7966DC1810823500FA85AD /* icon-small.png */; }; 7E7966E61810823500FA85AD /* icon-small.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E7966DC1810823500FA85AD /* icon-small.png */; };
7E7966E71810823500FA85AD /* icon-small@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E7966DD1810823500FA85AD /* icon-small@2x.png */; }; 7E7966E71810823500FA85AD /* icon-small@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E7966DD1810823500FA85AD /* icon-small@2x.png */; };
D4A0D8761607E02300AEF8BB /* Default-568h@2x~iphone.png in Resources */ = {isa = PBXBuildFile; fileRef = D4A0D8751607E02300AEF8BB /* Default-568h@2x~iphone.png */; };
3311FE6F740C4E61B4062834 /* CDVDevice.m in Sources */ = {isa = PBXBuildFile; fileRef = E44647A1A9E44070A483ABAE /* CDVDevice.m */; };
B05FD4050A8049DD95D3B0A4 /* APPLocalNotification.m in Sources */ = {isa = PBXBuildFile; fileRef = FF94CC0869014D94864987A3 /* APPLocalNotification.m */; };
B3094EF611C545D69C6CAFB1 /* APPLocalNotificationOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 2E94A154193F45808ED4A20E /* APPLocalNotificationOptions.m */; };
26BE57B20E1949D089D5EF06 /* UIApplication+APPLocalNotification.m in Sources */ = {isa = PBXBuildFile; fileRef = 38328F7FE48047AD90611624 /* UIApplication+APPLocalNotification.m */; };
BEF8E5A4C44E40049E9A638E /* UILocalNotification+APPLocalNotification.m in Sources */ = {isa = PBXBuildFile; fileRef = 643825E01BE6429D957BC5E9 /* UILocalNotification+APPLocalNotification.m */; };
9AF00F0BC0694C408D82918E /* Toast+UIView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6C1FEB7986764F8D80C9460D /* Toast+UIView.m */; }; 9AF00F0BC0694C408D82918E /* Toast+UIView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6C1FEB7986764F8D80C9460D /* Toast+UIView.m */; };
345E79E8B29A4BC0911A1AD9 /* Toast.m in Sources */ = {isa = PBXBuildFile; fileRef = 73FFCCD6DE0C4F41A5CD8A42 /* Toast.m */; }; D4A0D8761607E02300AEF8BB /* Default-568h@2x~iphone.png in Resources */ = {isa = PBXBuildFile; fileRef = D4A0D8751607E02300AEF8BB /* Default-568h@2x~iphone.png */; };
3EC215006CC74A65BB090187 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 47EB2B35CA524D62A59BD0CD /* QuartzCore.framework */; }; 383D0BC6E5AD468CA0DB7269 /* APPLocalNotification.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DF9550522254C17A4FD57FB /* APPLocalNotification.m */; };
398FB094C4774595A5BD97A5 /* APPLocalNotificationOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 99B472F862994183B713CD99 /* APPLocalNotificationOptions.m */; };
19469EFA32F64CB7BD7A3A01 /* UIApplication+APPLocalNotification.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EAE9E33BA4D4133860A98E4 /* UIApplication+APPLocalNotification.m */; };
0117A6A182EE4E83BEEC628F /* UILocalNotification+APPLocalNotification.m in Sources */ = {isa = PBXBuildFile; fileRef = 71A82CC8177D4613A5D4F19F /* UILocalNotification+APPLocalNotification.m */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */ /* Begin PBXContainerItemProxy section */
...@@ -69,9 +68,7 @@ ...@@ -69,9 +68,7 @@
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
1D3623240D0F684500981E51 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; }; 1D3623240D0F684500981E51 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
1D3623250D0F684500981E51 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; }; 1D3623250D0F684500981E51 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
1D6058910D05DD3D006BFB54 /* NotificationExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "NotificationExample.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 1D6058910D05DD3D006BFB54 /* NotificationExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = NotificationExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
1F766FDD13BBADB100FB74C0 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = Localizable.strings; sourceTree = "<group>"; };
1F766FE013BBADB100FB74C0 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = Localizable.strings; sourceTree = "<group>"; };
288765FC0DF74451002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 288765FC0DF74451002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; }; 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
301BF52D109A57CC0062928A /* CordovaLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = CordovaLib.xcodeproj; path = CordovaLib/CordovaLib.xcodeproj; sourceTree = "<group>"; }; 301BF52D109A57CC0062928A /* CordovaLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = CordovaLib.xcodeproj; path = CordovaLib/CordovaLib.xcodeproj; sourceTree = "<group>"; };
...@@ -95,7 +92,13 @@ ...@@ -95,7 +92,13 @@
30C1856519D5FC0A00212699 /* icon-60@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-60@3x.png"; sourceTree = "<group>"; }; 30C1856519D5FC0A00212699 /* icon-60@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-60@3x.png"; sourceTree = "<group>"; };
30FC414816E50CA1004E6F35 /* icon-72@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-72@2x.png"; sourceTree = "<group>"; }; 30FC414816E50CA1004E6F35 /* icon-72@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-72@2x.png"; sourceTree = "<group>"; };
32CA4F630368D1EE00C91783 /* NotificationExample-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NotificationExample-Prefix.pch"; sourceTree = "<group>"; }; 32CA4F630368D1EE00C91783 /* NotificationExample-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NotificationExample-Prefix.pch"; sourceTree = "<group>"; };
3471FA8FC7F847CCABBCB926 /* CDVDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVDevice.h; path = org.apache.cordova.device/CDVDevice.h; sourceTree = "<group>"; };
422DA32284B54A2FA7DF8E04 /* Toast.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Toast.h; path = "nl.x-services.plugins.toast/Toast.h"; sourceTree = "<group>"; };
47EB2B35CA524D62A59BD0CD /* QuartzCore.framework */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
49974152A0EA4CEE8C46D9A5 /* Toast+UIView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "Toast+UIView.h"; path = "nl.x-services.plugins.toast/Toast+UIView.h"; sourceTree = "<group>"; };
5B1594DC16A7569C00FEF299 /* AssetsLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AssetsLibrary.framework; path = System/Library/Frameworks/AssetsLibrary.framework; sourceTree = SDKROOT; }; 5B1594DC16A7569C00FEF299 /* AssetsLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AssetsLibrary.framework; path = System/Library/Frameworks/AssetsLibrary.framework; sourceTree = SDKROOT; };
6C1FEB7986764F8D80C9460D /* Toast+UIView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "Toast+UIView.m"; path = "nl.x-services.plugins.toast/Toast+UIView.m"; sourceTree = "<group>"; };
73FFCCD6DE0C4F41A5CD8A42 /* Toast.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Toast.m; path = "nl.x-services.plugins.toast/Toast.m"; sourceTree = "<group>"; };
7E7966D41810823500FA85AD /* icon-40.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-40.png"; sourceTree = "<group>"; }; 7E7966D41810823500FA85AD /* icon-40.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-40.png"; sourceTree = "<group>"; };
7E7966D51810823500FA85AD /* icon-40@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-40@2x.png"; sourceTree = "<group>"; }; 7E7966D51810823500FA85AD /* icon-40@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-40@2x.png"; sourceTree = "<group>"; };
7E7966D61810823500FA85AD /* icon-50.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-50.png"; sourceTree = "<group>"; }; 7E7966D61810823500FA85AD /* icon-50.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-50.png"; sourceTree = "<group>"; };
...@@ -108,25 +111,18 @@ ...@@ -108,25 +111,18 @@
7E7966DD1810823500FA85AD /* icon-small@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-small@2x.png"; sourceTree = "<group>"; }; 7E7966DD1810823500FA85AD /* icon-small@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-small@2x.png"; sourceTree = "<group>"; };
8D1107310486CEB800E47090 /* NotificationExample-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "NotificationExample-Info.plist"; path = "../NotificationExample-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = "<group>"; }; 8D1107310486CEB800E47090 /* NotificationExample-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "NotificationExample-Info.plist"; path = "../NotificationExample-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = "<group>"; };
D4A0D8751607E02300AEF8BB /* Default-568h@2x~iphone.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x~iphone.png"; sourceTree = "<group>"; }; D4A0D8751607E02300AEF8BB /* Default-568h@2x~iphone.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x~iphone.png"; sourceTree = "<group>"; };
EB87FDF21871DA7A0020F90C /* merges */ = {isa = PBXFileReference; lastKnownFileType = folder; name = merges; path = ../../merges; sourceTree = "<group>"; }; E44647A1A9E44070A483ABAE /* CDVDevice.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVDevice.m; path = org.apache.cordova.device/CDVDevice.m; sourceTree = "<group>"; };
EB87FDF31871DA8E0020F90C /* www */ = {isa = PBXFileReference; lastKnownFileType = folder; name = www; path = ../../www; sourceTree = "<group>"; }; EB87FDF31871DA8E0020F90C /* www */ = {isa = PBXFileReference; lastKnownFileType = folder; name = www; path = ../../www; sourceTree = "<group>"; };
EB87FDF41871DAF40020F90C /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = config.xml; path = ../../config.xml; sourceTree = "<group>"; }; EB87FDF41871DAF40020F90C /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = config.xml; path = ../../config.xml; sourceTree = "<group>"; };
F840E1F0165FE0F500CFE078 /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = config.xml; path = "NotificationExample/config.xml"; sourceTree = "<group>"; }; F840E1F0165FE0F500CFE078 /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = config.xml; path = NotificationExample/config.xml; sourceTree = "<group>"; };
E44647A1A9E44070A483ABAE /* CDVDevice.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "CDVDevice.m"; path = "org.apache.cordova.device/CDVDevice.m"; sourceTree = "<group>"; fileEncoding = 4; }; 7DF9550522254C17A4FD57FB /* APPLocalNotification.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "APPLocalNotification.m"; path = "de.appplant.cordova.plugin.local-notification/APPLocalNotification.m"; sourceTree = "<group>"; fileEncoding = 4; };
3471FA8FC7F847CCABBCB926 /* CDVDevice.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "CDVDevice.h"; path = "org.apache.cordova.device/CDVDevice.h"; sourceTree = "<group>"; fileEncoding = 4; }; 99B472F862994183B713CD99 /* APPLocalNotificationOptions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "APPLocalNotificationOptions.m"; path = "de.appplant.cordova.plugin.local-notification/APPLocalNotificationOptions.m"; sourceTree = "<group>"; fileEncoding = 4; };
FF94CC0869014D94864987A3 /* APPLocalNotification.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "APPLocalNotification.m"; path = "de.appplant.cordova.plugin.local-notification/APPLocalNotification.m"; sourceTree = "<group>"; fileEncoding = 4; }; 6EAE9E33BA4D4133860A98E4 /* UIApplication+APPLocalNotification.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "UIApplication+APPLocalNotification.m"; path = "de.appplant.cordova.plugin.local-notification/UIApplication+APPLocalNotification.m"; sourceTree = "<group>"; fileEncoding = 4; };
2E94A154193F45808ED4A20E /* APPLocalNotificationOptions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "APPLocalNotificationOptions.m"; path = "de.appplant.cordova.plugin.local-notification/APPLocalNotificationOptions.m"; sourceTree = "<group>"; fileEncoding = 4; }; 71A82CC8177D4613A5D4F19F /* UILocalNotification+APPLocalNotification.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "UILocalNotification+APPLocalNotification.m"; path = "de.appplant.cordova.plugin.local-notification/UILocalNotification+APPLocalNotification.m"; sourceTree = "<group>"; fileEncoding = 4; };
38328F7FE48047AD90611624 /* UIApplication+APPLocalNotification.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "UIApplication+APPLocalNotification.m"; path = "de.appplant.cordova.plugin.local-notification/UIApplication+APPLocalNotification.m"; sourceTree = "<group>"; fileEncoding = 4; }; 8DEA336FEF244C7EA2348418 /* APPLocalNotification.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "APPLocalNotification.h"; path = "de.appplant.cordova.plugin.local-notification/APPLocalNotification.h"; sourceTree = "<group>"; fileEncoding = 4; };
643825E01BE6429D957BC5E9 /* UILocalNotification+APPLocalNotification.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "UILocalNotification+APPLocalNotification.m"; path = "de.appplant.cordova.plugin.local-notification/UILocalNotification+APPLocalNotification.m"; sourceTree = "<group>"; fileEncoding = 4; }; 84BE804849D645818468A4EA /* APPLocalNotificationOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "APPLocalNotificationOptions.h"; path = "de.appplant.cordova.plugin.local-notification/APPLocalNotificationOptions.h"; sourceTree = "<group>"; fileEncoding = 4; };
425ABDA4390E47109EAF6ED9 /* APPLocalNotification.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "APPLocalNotification.h"; path = "de.appplant.cordova.plugin.local-notification/APPLocalNotification.h"; sourceTree = "<group>"; fileEncoding = 4; }; 88363D98DED14E718C166C96 /* UIApplication+APPLocalNotification.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "UIApplication+APPLocalNotification.h"; path = "de.appplant.cordova.plugin.local-notification/UIApplication+APPLocalNotification.h"; sourceTree = "<group>"; fileEncoding = 4; };
D5BB49CB35A6417FBB330C45 /* APPLocalNotificationOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "APPLocalNotificationOptions.h"; path = "de.appplant.cordova.plugin.local-notification/APPLocalNotificationOptions.h"; sourceTree = "<group>"; fileEncoding = 4; }; 81C7D8155F7841779AA958E4 /* UILocalNotification+APPLocalNotification.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "UILocalNotification+APPLocalNotification.h"; path = "de.appplant.cordova.plugin.local-notification/UILocalNotification+APPLocalNotification.h"; sourceTree = "<group>"; fileEncoding = 4; };
EA448103D2324A9FB165BB1D /* UIApplication+APPLocalNotification.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "UIApplication+APPLocalNotification.h"; path = "de.appplant.cordova.plugin.local-notification/UIApplication+APPLocalNotification.h"; sourceTree = "<group>"; fileEncoding = 4; };
B0D77DF8D3E94A2D97710847 /* UILocalNotification+APPLocalNotification.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "UILocalNotification+APPLocalNotification.h"; path = "de.appplant.cordova.plugin.local-notification/UILocalNotification+APPLocalNotification.h"; sourceTree = "<group>"; fileEncoding = 4; };
6C1FEB7986764F8D80C9460D /* Toast+UIView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "Toast+UIView.m"; path = "nl.x-services.plugins.toast/Toast+UIView.m"; sourceTree = "<group>"; fileEncoding = 4; };
73FFCCD6DE0C4F41A5CD8A42 /* Toast.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "Toast.m"; path = "nl.x-services.plugins.toast/Toast.m"; sourceTree = "<group>"; fileEncoding = 4; };
49974152A0EA4CEE8C46D9A5 /* Toast+UIView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "Toast+UIView.h"; path = "nl.x-services.plugins.toast/Toast+UIView.h"; sourceTree = "<group>"; fileEncoding = 4; };
422DA32284B54A2FA7DF8E04 /* Toast.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "Toast.h"; path = "nl.x-services.plugins.toast/Toast.h"; sourceTree = "<group>"; fileEncoding = 4; };
47EB2B35CA524D62A59BD0CD /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = "QuartzCore.framework"; path = "System/Library/Frameworks/QuartzCore.framework"; sourceTree = SDKROOT; fileEncoding = 4; };
/* End PBXFileReference section */ /* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */ /* Begin PBXFrameworksBuildPhase section */
...@@ -155,7 +151,7 @@ ...@@ -155,7 +151,7 @@
1D3623250D0F684500981E51 /* AppDelegate.m */, 1D3623250D0F684500981E51 /* AppDelegate.m */,
); );
name = Classes; name = Classes;
path = "NotificationExample/Classes"; path = NotificationExample/Classes;
sourceTree = SOURCE_ROOT; sourceTree = SOURCE_ROOT;
}; };
19C28FACFE9D520D11CA2CBB /* Products */ = { 19C28FACFE9D520D11CA2CBB /* Products */ = {
...@@ -171,7 +167,6 @@ ...@@ -171,7 +167,6 @@
children = ( children = (
EB87FDF41871DAF40020F90C /* config.xml */, EB87FDF41871DAF40020F90C /* config.xml */,
EB87FDF31871DA8E0020F90C /* www */, EB87FDF31871DA8E0020F90C /* www */,
EB87FDF21871DA7A0020F90C /* merges */,
EB87FDF11871DA420020F90C /* Staging */, EB87FDF11871DA420020F90C /* Staging */,
301BF52D109A57CC0062928A /* CordovaLib.xcodeproj */, 301BF52D109A57CC0062928A /* CordovaLib.xcodeproj */,
080E96DDFE201D6D7F000001 /* Classes */, 080E96DDFE201D6D7F000001 /* Classes */,
...@@ -191,7 +186,7 @@ ...@@ -191,7 +186,7 @@
29B97316FDCFA39411CA2CEA /* main.m */, 29B97316FDCFA39411CA2CEA /* main.m */,
); );
name = "Other Sources"; name = "Other Sources";
path = "NotificationExample"; path = NotificationExample;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
29B97317FDCFA39411CA2CEA /* Resources */ = { 29B97317FDCFA39411CA2CEA /* Resources */ = {
...@@ -202,7 +197,7 @@ ...@@ -202,7 +197,7 @@
8D1107310486CEB800E47090 /* NotificationExample-Info.plist */, 8D1107310486CEB800E47090 /* NotificationExample-Info.plist */,
); );
name = Resources; name = Resources;
path = "NotificationExample/Resources"; path = NotificationExample/Resources;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
29B97323FDCFA39411CA2CEA /* Frameworks */ = { 29B97323FDCFA39411CA2CEA /* Frameworks */ = {
...@@ -229,21 +224,21 @@ ...@@ -229,21 +224,21 @@
children = ( children = (
E44647A1A9E44070A483ABAE /* CDVDevice.m */, E44647A1A9E44070A483ABAE /* CDVDevice.m */,
3471FA8FC7F847CCABBCB926 /* CDVDevice.h */, 3471FA8FC7F847CCABBCB926 /* CDVDevice.h */,
FF94CC0869014D94864987A3 /* APPLocalNotification.m */,
2E94A154193F45808ED4A20E /* APPLocalNotificationOptions.m */,
38328F7FE48047AD90611624 /* UIApplication+APPLocalNotification.m */,
643825E01BE6429D957BC5E9 /* UILocalNotification+APPLocalNotification.m */,
425ABDA4390E47109EAF6ED9 /* APPLocalNotification.h */,
D5BB49CB35A6417FBB330C45 /* APPLocalNotificationOptions.h */,
EA448103D2324A9FB165BB1D /* UIApplication+APPLocalNotification.h */,
B0D77DF8D3E94A2D97710847 /* UILocalNotification+APPLocalNotification.h */,
6C1FEB7986764F8D80C9460D /* Toast+UIView.m */, 6C1FEB7986764F8D80C9460D /* Toast+UIView.m */,
73FFCCD6DE0C4F41A5CD8A42 /* Toast.m */, 73FFCCD6DE0C4F41A5CD8A42 /* Toast.m */,
49974152A0EA4CEE8C46D9A5 /* Toast+UIView.h */, 49974152A0EA4CEE8C46D9A5 /* Toast+UIView.h */,
422DA32284B54A2FA7DF8E04 /* Toast.h */, 422DA32284B54A2FA7DF8E04 /* Toast.h */,
7DF9550522254C17A4FD57FB /* APPLocalNotification.m */,
99B472F862994183B713CD99 /* APPLocalNotificationOptions.m */,
6EAE9E33BA4D4133860A98E4 /* UIApplication+APPLocalNotification.m */,
71A82CC8177D4613A5D4F19F /* UILocalNotification+APPLocalNotification.m */,
8DEA336FEF244C7EA2348418 /* APPLocalNotification.h */,
84BE804849D645818468A4EA /* APPLocalNotificationOptions.h */,
88363D98DED14E718C166C96 /* UIApplication+APPLocalNotification.h */,
81C7D8155F7841779AA958E4 /* UILocalNotification+APPLocalNotification.h */,
); );
name = Plugins; name = Plugins;
path = "NotificationExample/Plugins"; path = NotificationExample/Plugins;
sourceTree = SOURCE_ROOT; sourceTree = SOURCE_ROOT;
}; };
308D052D1370CCF300D202BF /* icons */ = { 308D052D1370CCF300D202BF /* icons */ = {
...@@ -311,8 +306,8 @@ ...@@ -311,8 +306,8 @@
dependencies = ( dependencies = (
301BF551109A68C00062928A /* PBXTargetDependency */, 301BF551109A68C00062928A /* PBXTargetDependency */,
); );
name = "NotificationExample"; name = NotificationExample;
productName = "NotificationExample"; productName = NotificationExample;
productReference = 1D6058910D05DD3D006BFB54 /* NotificationExample.app */; productReference = 1D6058910D05DD3D006BFB54 /* NotificationExample.app */;
productType = "com.apple.product-type.application"; productType = "com.apple.product-type.application";
}; };
...@@ -324,7 +319,7 @@ ...@@ -324,7 +319,7 @@
attributes = { attributes = {
LastUpgradeCheck = 510; LastUpgradeCheck = 510;
}; };
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "__CLI__" */; buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "NotificationExample" */;
compatibilityVersion = "Xcode 3.2"; compatibilityVersion = "Xcode 3.2";
developmentRegion = English; developmentRegion = English;
hasScannedForEncodings = 1; hasScannedForEncodings = 1;
...@@ -425,13 +420,12 @@ ...@@ -425,13 +420,12 @@
1D60589B0D05DD56006BFB54 /* main.m in Sources */, 1D60589B0D05DD56006BFB54 /* main.m in Sources */,
1D3623260D0F684500981E51 /* AppDelegate.m in Sources */, 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */,
302D95F114D2391D003F00A1 /* MainViewController.m in Sources */, 302D95F114D2391D003F00A1 /* MainViewController.m in Sources */,
3311FE6F740C4E61B4062834 /* CDVDevice.m in Sources */,
B05FD4050A8049DD95D3B0A4 /* APPLocalNotification.m in Sources */,
B3094EF611C545D69C6CAFB1 /* APPLocalNotificationOptions.m in Sources */,
26BE57B20E1949D089D5EF06 /* UIApplication+APPLocalNotification.m in Sources */,
BEF8E5A4C44E40049E9A638E /* UILocalNotification+APPLocalNotification.m in Sources */,
9AF00F0BC0694C408D82918E /* Toast+UIView.m in Sources */, 9AF00F0BC0694C408D82918E /* Toast+UIView.m in Sources */,
345E79E8B29A4BC0911A1AD9 /* Toast.m in Sources */, 345E79E8B29A4BC0911A1AD9 /* Toast.m in Sources */,
383D0BC6E5AD468CA0DB7269 /* APPLocalNotification.m in Sources */,
398FB094C4774595A5BD97A5 /* APPLocalNotificationOptions.m in Sources */,
19469EFA32F64CB7BD7A3A01 /* UIApplication+APPLocalNotification.m in Sources */,
0117A6A182EE4E83BEEC628F /* UILocalNotification+APPLocalNotification.m in Sources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
...@@ -472,7 +466,7 @@ ...@@ -472,7 +466,7 @@
"-weak-lSystem", "-weak-lSystem",
"-ObjC", "-ObjC",
); );
PRODUCT_NAME = "NotificationExample"; PRODUCT_NAME = NotificationExample;
TARGETED_DEVICE_FAMILY = "1,2"; TARGETED_DEVICE_FAMILY = "1,2";
}; };
name = Debug; name = Debug;
...@@ -501,7 +495,7 @@ ...@@ -501,7 +495,7 @@
"-weak-lSystem", "-weak-lSystem",
"-ObjC", "-ObjC",
); );
PRODUCT_NAME = "NotificationExample"; PRODUCT_NAME = NotificationExample;
TARGETED_DEVICE_FAMILY = "1,2"; TARGETED_DEVICE_FAMILY = "1,2";
}; };
name = Release; name = Release;
...@@ -605,7 +599,7 @@ ...@@ -605,7 +599,7 @@
defaultConfigurationIsVisible = 0; defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release; defaultConfigurationName = Release;
}; };
C01FCF4E08A954540054247B /* Build configuration list for PBXProject "__CLI__" */ = { C01FCF4E08A954540054247B /* Build configuration list for PBXProject "NotificationExample" */ = {
isa = XCConfigurationList; isa = XCConfigurationList;
buildConfigurations = ( buildConfigurations = (
C01FCF4F08A954540054247B /* Debug */, C01FCF4F08A954540054247B /* Debug */,
......
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "1"
version = "2.0">
</Bucket>
...@@ -23,6 +23,9 @@ ...@@ -23,6 +23,9 @@
</author> </author>
<content src="index.html" /> <content src="index.html" />
<access origin="*" /> <access origin="*" />
<feature name="Toast">
<param name="ios-package" value="Toast" />
</feature>
<feature name="Device"> <feature name="Device">
<param name="ios-package" value="CDVDevice" /> <param name="ios-package" value="CDVDevice" />
</feature> </feature>
...@@ -30,7 +33,4 @@ ...@@ -30,7 +33,4 @@
<param name="ios-package" onload="true" value="APPLocalNotification" /> <param name="ios-package" onload="true" value="APPLocalNotification" />
<param name="onload" value="true" /> <param name="onload" value="true" />
</feature> </feature>
<feature name="Toast">
<param name="ios-package" value="Toast" />
</feature>
</widget> </widget>
cordova.define('cordova/plugin_list', function(require, exports, module) { cordova.define('cordova/plugin_list', function(require, exports, module) {
module.exports = [ module.exports = [
{ {
"file": "plugins/nl.x-services.plugins.toast/www/Toast.js",
"id": "nl.x-services.plugins.toast.Toast",
"clobbers": [
"window.plugins.toast"
]
},
{
"file": "plugins/nl.x-services.plugins.toast/test/tests.js",
"id": "nl.x-services.plugins.toast.tests"
},
{
"file": "plugins/de.appplant.cordova.plugin.local-notification/www/local-notification.js", "file": "plugins/de.appplant.cordova.plugin.local-notification/www/local-notification.js",
"id": "de.appplant.cordova.plugin.local-notification.LocalNotification", "id": "de.appplant.cordova.plugin.local-notification.LocalNotification",
"clobbers": [ "clobbers": [
...@@ -25,17 +36,6 @@ module.exports = [ ...@@ -25,17 +36,6 @@ module.exports = [
] ]
}, },
{ {
"file": "plugins/nl.x-services.plugins.toast/www/Toast.js",
"id": "nl.x-services.plugins.toast.Toast",
"clobbers": [
"window.plugins.toast"
]
},
{
"file": "plugins/nl.x-services.plugins.toast/test/tests.js",
"id": "nl.x-services.plugins.toast.tests"
},
{
"file": "plugins/org.apache.cordova.device/www/device.js", "file": "plugins/org.apache.cordova.device/www/device.js",
"id": "org.apache.cordova.device.device", "id": "org.apache.cordova.device.device",
"clobbers": [ "clobbers": [
...@@ -46,8 +46,8 @@ module.exports = [ ...@@ -46,8 +46,8 @@ module.exports = [
module.exports.metadata = module.exports.metadata =
// TOP OF METADATA // TOP OF METADATA
{ {
"de.appplant.cordova.plugin.local-notification": "0.8.2dev",
"nl.x-services.plugins.toast": "2.0.3", "nl.x-services.plugins.toast": "2.0.3",
"de.appplant.cordova.plugin.local-notification": "0.8.2dev",
"org.apache.cordova.device": "0.3.0" "org.apache.cordova.device": "0.3.0"
} }
// BOTTOM OF METADATA // BOTTOM OF METADATA
......
...@@ -308,6 +308,7 @@ ...@@ -308,6 +308,7 @@
<!-- IDs --> <!-- IDs -->
<script type="text/javascript"> <script type="text/javascript">
var callbackIds = function (ids) { var callbackIds = function (ids) {
console.log(ids);
showToast(ids.length === 0 ? '- none -' : ids.join(' ,')); showToast(ids.length === 0 ? '- none -' : ids.join(' ,'));
}; };
...@@ -331,8 +332,13 @@ ...@@ -331,8 +332,13 @@
showToast(notifications.length === 0 ? '- none -' : notifications.join(' ,')); showToast(notifications.length === 0 ? '- none -' : notifications.join(' ,'));
}; };
var callbackSingleOpts = function (notification) {
console.log(notification);
showToast(notification.toString());
};
get = function () { get = function () {
cordova.plugins.notification.local.get(1, callbackOpts); cordova.plugins.notification.local.get(1, callbackSingleOpts);
}; };
getMultiple = function () { getMultiple = function () {
......
...@@ -275,7 +275,8 @@ exports.get = function () { ...@@ -275,7 +275,8 @@ exports.get = function () {
scope = args[2]; scope = args[2];
if (!Array.isArray(ids)) { if (!Array.isArray(ids)) {
ids = [ids]; this.exec('getSingle', ids.toString(), callback, scope);
return;
} }
ids = this.convertIds(ids); ids = this.convertIds(ids);
...@@ -321,6 +322,11 @@ exports.getScheduled = function () { ...@@ -321,6 +322,11 @@ exports.getScheduled = function () {
ids = [ids]; ids = [ids];
} }
if (!Array.isArray(ids)) {
this.exec('getSingleScheduled', ids.toString(), callback, scope);
return;
}
ids = this.convertIds(ids); ids = this.convertIds(ids);
this.exec('getScheduled', ids, callback, scope); this.exec('getScheduled', ids, callback, scope);
...@@ -364,6 +370,11 @@ exports.getTriggered = function () { ...@@ -364,6 +370,11 @@ exports.getTriggered = function () {
ids = [ids]; ids = [ids];
} }
if (!Array.isArray(ids)) {
this.exec('getSingleTriggered', ids.toString(), callback, scope);
return;
}
ids = this.convertIds(ids); ids = this.convertIds(ids);
this.exec('getTriggered', ids, callback, scope); this.exec('getTriggered', ids, callback, scope);
......
<?xml version="1.0" encoding="utf-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<OutputPath>build\windows80\$(Configuration)\$(Platform)\</OutputPath>
<IntermediateOutputPath>build\windows80\bld\</IntermediateOutputPath>
</PropertyGroup>
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|AnyCPU">
<Configuration>Debug</Configuration>
<Platform>AnyCPU</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x86">
<Configuration>Debug</Configuration>
<Platform>x86</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|AnyCPU">
<Configuration>Release</Configuration>
<Platform>AnyCPU</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM">
<Configuration>Release</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x86">
<Configuration>Release</Configuration>
<Platform>x86</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>efffab2f-bfc5-4eda-b545-45ef4995f55a</ProjectGuid>
</PropertyGroup>
<PropertyGroup Condition="'$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '11.0'">
<VisualStudioVersion>11.0</VisualStudioVersion>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).Default.props" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).props" />
<PropertyGroup>
<TargetPlatformIdentifier>Windows</TargetPlatformIdentifier>
<TargetPlatformVersion>8.0</TargetPlatformVersion>
<DefaultLanguage>en-US</DefaultLanguage>
<PackageCertificateKeyFile>CordovaApp_TemporaryKey.pfx</PackageCertificateKeyFile>
</PropertyGroup>
<ItemGroup>
<AppxManifest Include="package.windows80.appxmanifest">
<SubType>Designer</SubType>
</AppxManifest>
<Content Include="images\*.png" Exclude="images\*.scale-240.*" />
<None Include="CordovaApp_TemporaryKey.pfx" />
</ItemGroup>
<ItemGroup>
<SDKReference Include="Microsoft.WinJS.1.0, Version=1.0" />
</ItemGroup>
<Import Project="CordovaApp.projitems" Label="Shared" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).targets" />
<PropertyGroup>
<BuildFromCordovaTooling>false</BuildFromCordovaTooling>
<PreBuildEvent Condition="$(BuildFromCordovaTooling) != true">
cd /d $(MSBuildThisFileDirectory)
node -e "require('./cordova/lib/prepare.js').applyPlatformConfig()"
</PreBuildEvent>
</PropertyGroup>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest">
<Identity Name="e8de53c0-cf2d-11e4-8bb0-9369d008f7b1" Version="1.0.0.0" Publisher="CN=$username$" />
<Properties>
<DisplayName>NotificationExample</DisplayName>
<PublisherDisplayName>$username$</PublisherDisplayName>
<Logo>images\storelogo.png</Logo>
</Properties>
<Prerequisites>
<OSMinVersion>6.2.1</OSMinVersion>
<OSMaxVersionTested>6.2.1</OSMaxVersionTested>
</Prerequisites>
<Resources>
<Resource Language="x-generate" />
</Resources>
<Applications>
<Application Id="de.appplant.localnotification.example" StartPage="www/index.html">
<VisualElements DisplayName="NotificationExample"
Logo="images\Square150x150Logo.png"
SmallLogo="images\Square30x30Logo.png"
Description="CordovaApp"
ForegroundText="light"
BackgroundColor="#464646">
<DefaultTile ShowName="allLogos" WideLogo="images\Wide310x150Logo.png"/>
<SplashScreen Image="images\splashscreen.png" />
</VisualElements>
</Application>
</Applications>
<Capabilities>
<Capability Name="internetClient" />
</Capabilities>
</Package>
\ No newline at end of file
// Platform: windows
// fc4db9145934bd0053161cbf9ffc0caf83b770c6
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/
;(function() {
var PLATFORM_VERSION_BUILD_LABEL = '3.8.0';
// file: src/scripts/require.js
/*jshint -W079 */
/*jshint -W020 */
var require,
define;
(function () {
var modules = {},
// Stack of moduleIds currently being built.
requireStack = [],
// Map of module ID -> index into requireStack of modules currently being built.
inProgressModules = {},
SEPARATOR = ".";
function build(module) {
var factory = module.factory,
localRequire = function (id) {
var resultantId = id;
//Its a relative path, so lop off the last portion and add the id (minus "./")
if (id.charAt(0) === ".") {
resultantId = module.id.slice(0, module.id.lastIndexOf(SEPARATOR)) + SEPARATOR + id.slice(2);
}
return require(resultantId);
};
module.exports = {};
delete module.factory;
factory(localRequire, module.exports, module);
return module.exports;
}
require = function (id) {
if (!modules[id]) {
throw "module " + id + " not found";
} else if (id in inProgressModules) {
var cycle = requireStack.slice(inProgressModules[id]).join('->') + '->' + id;
throw "Cycle in require graph: " + cycle;
}
if (modules[id].factory) {
try {
inProgressModules[id] = requireStack.length;
requireStack.push(id);
return build(modules[id]);
} finally {
delete inProgressModules[id];
requireStack.pop();
}
}
return modules[id].exports;
};
define = function (id, factory) {
if (modules[id]) {
throw "module " + id + " already defined";
}
modules[id] = {
id: id,
factory: factory
};
};
define.remove = function (id) {
delete modules[id];
};
define.moduleMap = modules;
})();
//Export for use in node
if (typeof module === "object" && typeof require === "function") {
module.exports.require = require;
module.exports.define = define;
}
// file: src/cordova.js
define("cordova", function(require, exports, module) {
var channel = require('cordova/channel');
var platform = require('cordova/platform');
/**
* Intercept calls to addEventListener + removeEventListener and handle deviceready,
* resume, and pause events.
*/
var m_document_addEventListener = document.addEventListener;
var m_document_removeEventListener = document.removeEventListener;
var m_window_addEventListener = window.addEventListener;
var m_window_removeEventListener = window.removeEventListener;
/**
* Houses custom event handlers to intercept on document + window event listeners.
*/
var documentEventHandlers = {},
windowEventHandlers = {};
document.addEventListener = function(evt, handler, capture) {
var e = evt.toLowerCase();
if (typeof documentEventHandlers[e] != 'undefined') {
documentEventHandlers[e].subscribe(handler);
} else {
m_document_addEventListener.call(document, evt, handler, capture);
}
};
window.addEventListener = function(evt, handler, capture) {
var e = evt.toLowerCase();
if (typeof windowEventHandlers[e] != 'undefined') {
windowEventHandlers[e].subscribe(handler);
} else {
m_window_addEventListener.call(window, evt, handler, capture);
}
};
document.removeEventListener = function(evt, handler, capture) {
var e = evt.toLowerCase();
// If unsubscribing from an event that is handled by a plugin
if (typeof documentEventHandlers[e] != "undefined") {
documentEventHandlers[e].unsubscribe(handler);
} else {
m_document_removeEventListener.call(document, evt, handler, capture);
}
};
window.removeEventListener = function(evt, handler, capture) {
var e = evt.toLowerCase();
// If unsubscribing from an event that is handled by a plugin
if (typeof windowEventHandlers[e] != "undefined") {
windowEventHandlers[e].unsubscribe(handler);
} else {
m_window_removeEventListener.call(window, evt, handler, capture);
}
};
function createEvent(type, data) {
var event = document.createEvent('Events');
event.initEvent(type, false, false);
if (data) {
for (var i in data) {
if (data.hasOwnProperty(i)) {
event[i] = data[i];
}
}
}
return event;
}
var cordova = {
define:define,
require:require,
version:PLATFORM_VERSION_BUILD_LABEL,
platformVersion:PLATFORM_VERSION_BUILD_LABEL,
platformId:platform.id,
/**
* Methods to add/remove your own addEventListener hijacking on document + window.
*/
addWindowEventHandler:function(event) {
return (windowEventHandlers[event] = channel.create(event));
},
addStickyDocumentEventHandler:function(event) {
return (documentEventHandlers[event] = channel.createSticky(event));
},
addDocumentEventHandler:function(event) {
return (documentEventHandlers[event] = channel.create(event));
},
removeWindowEventHandler:function(event) {
delete windowEventHandlers[event];
},
removeDocumentEventHandler:function(event) {
delete documentEventHandlers[event];
},
/**
* Retrieve original event handlers that were replaced by Cordova
*
* @return object
*/
getOriginalHandlers: function() {
return {'document': {'addEventListener': m_document_addEventListener, 'removeEventListener': m_document_removeEventListener},
'window': {'addEventListener': m_window_addEventListener, 'removeEventListener': m_window_removeEventListener}};
},
/**
* Method to fire event from native code
* bNoDetach is required for events which cause an exception which needs to be caught in native code
*/
fireDocumentEvent: function(type, data, bNoDetach) {
var evt = createEvent(type, data);
if (typeof documentEventHandlers[type] != 'undefined') {
if( bNoDetach ) {
documentEventHandlers[type].fire(evt);
}
else {
setTimeout(function() {
// Fire deviceready on listeners that were registered before cordova.js was loaded.
if (type == 'deviceready') {
document.dispatchEvent(evt);
}
documentEventHandlers[type].fire(evt);
}, 0);
}
} else {
document.dispatchEvent(evt);
}
},
fireWindowEvent: function(type, data) {
var evt = createEvent(type,data);
if (typeof windowEventHandlers[type] != 'undefined') {
setTimeout(function() {
windowEventHandlers[type].fire(evt);
}, 0);
} else {
window.dispatchEvent(evt);
}
},
/**
* Plugin callback mechanism.
*/
// Randomize the starting callbackId to avoid collisions after refreshing or navigating.
// This way, it's very unlikely that any new callback would get the same callbackId as an old callback.
callbackId: Math.floor(Math.random() * 2000000000),
callbacks: {},
callbackStatus: {
NO_RESULT: 0,
OK: 1,
CLASS_NOT_FOUND_EXCEPTION: 2,
ILLEGAL_ACCESS_EXCEPTION: 3,
INSTANTIATION_EXCEPTION: 4,
MALFORMED_URL_EXCEPTION: 5,
IO_EXCEPTION: 6,
INVALID_ACTION: 7,
JSON_EXCEPTION: 8,
ERROR: 9
},
/**
* Called by native code when returning successful result from an action.
*/
callbackSuccess: function(callbackId, args) {
cordova.callbackFromNative(callbackId, true, args.status, [args.message], args.keepCallback);
},
/**
* Called by native code when returning error result from an action.
*/
callbackError: function(callbackId, args) {
// TODO: Deprecate callbackSuccess and callbackError in favour of callbackFromNative.
// Derive success from status.
cordova.callbackFromNative(callbackId, false, args.status, [args.message], args.keepCallback);
},
/**
* Called by native code when returning the result from an action.
*/
callbackFromNative: function(callbackId, isSuccess, status, args, keepCallback) {
try {
var callback = cordova.callbacks[callbackId];
if (callback) {
if (isSuccess && status == cordova.callbackStatus.OK) {
callback.success && callback.success.apply(null, args);
} else if (!isSuccess) {
callback.fail && callback.fail.apply(null, args);
}
/*
else
Note, this case is intentionally not caught.
this can happen if isSuccess is true, but callbackStatus is NO_RESULT
which is used to remove a callback from the list without calling the callbacks
typically keepCallback is false in this case
*/
// Clear callback if not expecting any more results
if (!keepCallback) {
delete cordova.callbacks[callbackId];
}
}
}
catch (err) {
var msg = "Error in " + (isSuccess ? "Success" : "Error") + " callbackId: " + callbackId + " : " + err;
console && console.log && console.log(msg);
cordova.fireWindowEvent("cordovacallbackerror", { 'message': msg });
throw err;
}
},
addConstructor: function(func) {
channel.onCordovaReady.subscribe(function() {
try {
func();
} catch(e) {
console.log("Failed to run constructor: " + e);
}
});
}
};
module.exports = cordova;
});
// file: src/common/argscheck.js
define("cordova/argscheck", function(require, exports, module) {
var exec = require('cordova/exec');
var utils = require('cordova/utils');
var moduleExports = module.exports;
var typeMap = {
'A': 'Array',
'D': 'Date',
'N': 'Number',
'S': 'String',
'F': 'Function',
'O': 'Object'
};
function extractParamName(callee, argIndex) {
return (/.*?\((.*?)\)/).exec(callee)[1].split(', ')[argIndex];
}
function checkArgs(spec, functionName, args, opt_callee) {
if (!moduleExports.enableChecks) {
return;
}
var errMsg = null;
var typeName;
for (var i = 0; i < spec.length; ++i) {
var c = spec.charAt(i),
cUpper = c.toUpperCase(),
arg = args[i];
// Asterix means allow anything.
if (c == '*') {
continue;
}
typeName = utils.typeName(arg);
if ((arg === null || arg === undefined) && c == cUpper) {
continue;
}
if (typeName != typeMap[cUpper]) {
errMsg = 'Expected ' + typeMap[cUpper];
break;
}
}
if (errMsg) {
errMsg += ', but got ' + typeName + '.';
errMsg = 'Wrong type for parameter "' + extractParamName(opt_callee || args.callee, i) + '" of ' + functionName + ': ' + errMsg;
// Don't log when running unit tests.
if (typeof jasmine == 'undefined') {
console.error(errMsg);
}
throw TypeError(errMsg);
}
}
function getValue(value, defaultValue) {
return value === undefined ? defaultValue : value;
}
moduleExports.checkArgs = checkArgs;
moduleExports.getValue = getValue;
moduleExports.enableChecks = true;
});
// file: src/common/base64.js
define("cordova/base64", function(require, exports, module) {
var base64 = exports;
base64.fromArrayBuffer = function(arrayBuffer) {
var array = new Uint8Array(arrayBuffer);
return uint8ToBase64(array);
};
base64.toArrayBuffer = function(str) {
var decodedStr = typeof atob != 'undefined' ? atob(str) : new Buffer(str,'base64').toString('binary');
var arrayBuffer = new ArrayBuffer(decodedStr.length);
var array = new Uint8Array(arrayBuffer);
for (var i=0, len=decodedStr.length; i < len; i++) {
array[i] = decodedStr.charCodeAt(i);
}
return arrayBuffer;
};
//------------------------------------------------------------------------------
/* This code is based on the performance tests at http://jsperf.com/b64tests
* This 12-bit-at-a-time algorithm was the best performing version on all
* platforms tested.
*/
var b64_6bit = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var b64_12bit;
var b64_12bitTable = function() {
b64_12bit = [];
for (var i=0; i<64; i++) {
for (var j=0; j<64; j++) {
b64_12bit[i*64+j] = b64_6bit[i] + b64_6bit[j];
}
}
b64_12bitTable = function() { return b64_12bit; };
return b64_12bit;
};
function uint8ToBase64(rawData) {
var numBytes = rawData.byteLength;
var output="";
var segment;
var table = b64_12bitTable();
for (var i=0;i<numBytes-2;i+=3) {
segment = (rawData[i] << 16) + (rawData[i+1] << 8) + rawData[i+2];
output += table[segment >> 12];
output += table[segment & 0xfff];
}
if (numBytes - i == 2) {
segment = (rawData[i] << 16) + (rawData[i+1] << 8);
output += table[segment >> 12];
output += b64_6bit[(segment & 0xfff) >> 6];
output += '=';
} else if (numBytes - i == 1) {
segment = (rawData[i] << 16);
output += table[segment >> 12];
output += '==';
}
return output;
}
});
// file: src/common/builder.js
define("cordova/builder", function(require, exports, module) {
var utils = require('cordova/utils');
function each(objects, func, context) {
for (var prop in objects) {
if (objects.hasOwnProperty(prop)) {
func.apply(context, [objects[prop], prop]);
}
}
}
function clobber(obj, key, value) {
exports.replaceHookForTesting(obj, key);
var needsProperty = false;
try {
obj[key] = value;
} catch (e) {
needsProperty = true;
}
// Getters can only be overridden by getters.
if (needsProperty || obj[key] !== value) {
utils.defineGetter(obj, key, function() {
return value;
});
}
}
function assignOrWrapInDeprecateGetter(obj, key, value, message) {
if (message) {
utils.defineGetter(obj, key, function() {
console.log(message);
delete obj[key];
clobber(obj, key, value);
return value;
});
} else {
clobber(obj, key, value);
}
}
function include(parent, objects, clobber, merge) {
each(objects, function (obj, key) {
try {
var result = obj.path ? require(obj.path) : {};
if (clobber) {
// Clobber if it doesn't exist.
if (typeof parent[key] === 'undefined') {
assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated);
} else if (typeof obj.path !== 'undefined') {
// If merging, merge properties onto parent, otherwise, clobber.
if (merge) {
recursiveMerge(parent[key], result);
} else {
assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated);
}
}
result = parent[key];
} else {
// Overwrite if not currently defined.
if (typeof parent[key] == 'undefined') {
assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated);
} else {
// Set result to what already exists, so we can build children into it if they exist.
result = parent[key];
}
}
if (obj.children) {
include(result, obj.children, clobber, merge);
}
} catch(e) {
utils.alert('Exception building Cordova JS globals: ' + e + ' for key "' + key + '"');
}
});
}
/**
* Merge properties from one object onto another recursively. Properties from
* the src object will overwrite existing target property.
*
* @param target Object to merge properties into.
* @param src Object to merge properties from.
*/
function recursiveMerge(target, src) {
for (var prop in src) {
if (src.hasOwnProperty(prop)) {
if (target.prototype && target.prototype.constructor === target) {
// If the target object is a constructor override off prototype.
clobber(target.prototype, prop, src[prop]);
} else {
if (typeof src[prop] === 'object' && typeof target[prop] === 'object') {
recursiveMerge(target[prop], src[prop]);
} else {
clobber(target, prop, src[prop]);
}
}
}
}
}
exports.buildIntoButDoNotClobber = function(objects, target) {
include(target, objects, false, false);
};
exports.buildIntoAndClobber = function(objects, target) {
include(target, objects, true, false);
};
exports.buildIntoAndMerge = function(objects, target) {
include(target, objects, true, true);
};
exports.recursiveMerge = recursiveMerge;
exports.assignOrWrapInDeprecateGetter = assignOrWrapInDeprecateGetter;
exports.replaceHookForTesting = function() {};
});
// file: src/common/channel.js
define("cordova/channel", function(require, exports, module) {
var utils = require('cordova/utils'),
nextGuid = 1;
/**
* Custom pub-sub "channel" that can have functions subscribed to it
* This object is used to define and control firing of events for
* cordova initialization, as well as for custom events thereafter.
*
* The order of events during page load and Cordova startup is as follows:
*
* onDOMContentLoaded* Internal event that is received when the web page is loaded and parsed.
* onNativeReady* Internal event that indicates the Cordova native side is ready.
* onCordovaReady* Internal event fired when all Cordova JavaScript objects have been created.
* onDeviceReady* User event fired to indicate that Cordova is ready
* onResume User event fired to indicate a start/resume lifecycle event
* onPause User event fired to indicate a pause lifecycle event
*
* The events marked with an * are sticky. Once they have fired, they will stay in the fired state.
* All listeners that subscribe after the event is fired will be executed right away.
*
* The only Cordova events that user code should register for are:
* deviceready Cordova native code is initialized and Cordova APIs can be called from JavaScript
* pause App has moved to background
* resume App has returned to foreground
*
* Listeners can be registered as:
* document.addEventListener("deviceready", myDeviceReadyListener, false);
* document.addEventListener("resume", myResumeListener, false);
* document.addEventListener("pause", myPauseListener, false);
*
* The DOM lifecycle events should be used for saving and restoring state
* window.onload
* window.onunload
*
*/
/**
* Channel
* @constructor
* @param type String the channel name
*/
var Channel = function(type, sticky) {
this.type = type;
// Map of guid -> function.
this.handlers = {};
// 0 = Non-sticky, 1 = Sticky non-fired, 2 = Sticky fired.
this.state = sticky ? 1 : 0;
// Used in sticky mode to remember args passed to fire().
this.fireArgs = null;
// Used by onHasSubscribersChange to know if there are any listeners.
this.numHandlers = 0;
// Function that is called when the first listener is subscribed, or when
// the last listener is unsubscribed.
this.onHasSubscribersChange = null;
},
channel = {
/**
* Calls the provided function only after all of the channels specified
* have been fired. All channels must be sticky channels.
*/
join: function(h, c) {
var len = c.length,
i = len,
f = function() {
if (!(--i)) h();
};
for (var j=0; j<len; j++) {
if (c[j].state === 0) {
throw Error('Can only use join with sticky channels.');
}
c[j].subscribe(f);
}
if (!len) h();
},
create: function(type) {
return channel[type] = new Channel(type, false);
},
createSticky: function(type) {
return channel[type] = new Channel(type, true);
},
/**
* cordova Channels that must fire before "deviceready" is fired.
*/
deviceReadyChannelsArray: [],
deviceReadyChannelsMap: {},
/**
* Indicate that a feature needs to be initialized before it is ready to be used.
* This holds up Cordova's "deviceready" event until the feature has been initialized
* and Cordova.initComplete(feature) is called.
*
* @param feature {String} The unique feature name
*/
waitForInitialization: function(feature) {
if (feature) {
var c = channel[feature] || this.createSticky(feature);
this.deviceReadyChannelsMap[feature] = c;
this.deviceReadyChannelsArray.push(c);
}
},
/**
* Indicate that initialization code has completed and the feature is ready to be used.
*
* @param feature {String} The unique feature name
*/
initializationComplete: function(feature) {
var c = this.deviceReadyChannelsMap[feature];
if (c) {
c.fire();
}
}
};
function forceFunction(f) {
if (typeof f != 'function') throw "Function required as first argument!";
}
/**
* Subscribes the given function to the channel. Any time that
* Channel.fire is called so too will the function.
* Optionally specify an execution context for the function
* and a guid that can be used to stop subscribing to the channel.
* Returns the guid.
*/
Channel.prototype.subscribe = function(f, c) {
// need a function to call
forceFunction(f);
if (this.state == 2) {
f.apply(c || this, this.fireArgs);
return;
}
var func = f,
guid = f.observer_guid;
if (typeof c == "object") { func = utils.close(c, f); }
if (!guid) {
// first time any channel has seen this subscriber
guid = '' + nextGuid++;
}
func.observer_guid = guid;
f.observer_guid = guid;
// Don't add the same handler more than once.
if (!this.handlers[guid]) {
this.handlers[guid] = func;
this.numHandlers++;
if (this.numHandlers == 1) {
this.onHasSubscribersChange && this.onHasSubscribersChange();
}
}
};
/**
* Unsubscribes the function with the given guid from the channel.
*/
Channel.prototype.unsubscribe = function(f) {
// need a function to unsubscribe
forceFunction(f);
var guid = f.observer_guid,
handler = this.handlers[guid];
if (handler) {
delete this.handlers[guid];
this.numHandlers--;
if (this.numHandlers === 0) {
this.onHasSubscribersChange && this.onHasSubscribersChange();
}
}
};
/**
* Calls all functions subscribed to this channel.
*/
Channel.prototype.fire = function(e) {
var fail = false,
fireArgs = Array.prototype.slice.call(arguments);
// Apply stickiness.
if (this.state == 1) {
this.state = 2;
this.fireArgs = fireArgs;
}
if (this.numHandlers) {
// Copy the values first so that it is safe to modify it from within
// callbacks.
var toCall = [];
for (var item in this.handlers) {
toCall.push(this.handlers[item]);
}
for (var i = 0; i < toCall.length; ++i) {
toCall[i].apply(this, fireArgs);
}
if (this.state == 2 && this.numHandlers) {
this.numHandlers = 0;
this.handlers = {};
this.onHasSubscribersChange && this.onHasSubscribersChange();
}
}
};
// defining them here so they are ready super fast!
// DOM event that is received when the web page is loaded and parsed.
channel.createSticky('onDOMContentLoaded');
// Event to indicate the Cordova native side is ready.
channel.createSticky('onNativeReady');
// Event to indicate that all Cordova JavaScript objects have been created
// and it's time to run plugin constructors.
channel.createSticky('onCordovaReady');
// Event to indicate that all automatically loaded JS plugins are loaded and ready.
// FIXME remove this
channel.createSticky('onPluginsReady');
// Event to indicate that Cordova is ready
channel.createSticky('onDeviceReady');
// Event to indicate a resume lifecycle event
channel.create('onResume');
// Event to indicate a pause lifecycle event
channel.create('onPause');
// Channels that must fire before "deviceready" is fired.
channel.waitForInitialization('onCordovaReady');
channel.waitForInitialization('onDOMContentLoaded');
module.exports = channel;
});
// file: src/windows/exec.js
define("cordova/exec", function(require, exports, module) {
/*jslint sloppy:true, plusplus:true*/
/*global require, module, console */
var cordova = require('cordova');
var execProxy = require('cordova/exec/proxy');
/**
* Execute a cordova command. It is up to the native side whether this action
* is synchronous or asynchronous. The native side can return:
* Synchronous: PluginResult object as a JSON string
* Asynchronous: Empty string ""
* If async, the native side will cordova.callbackSuccess or cordova.callbackError,
* depending upon the result of the action.
*
* @param {Function} success The success callback
* @param {Function} fail The fail callback
* @param {String} service The name of the service to use
* @param {String} action Action to be run in cordova
* @param {String[]} [args] Zero or more arguments to pass to the method
*/
module.exports = function (success, fail, service, action, args) {
var proxy = execProxy.get(service, action),
callbackId,
onSuccess,
onError;
args = args || [];
if (proxy) {
callbackId = service + cordova.callbackId++;
// console.log("EXEC:" + service + " : " + action);
if (typeof success === "function" || typeof fail === "function") {
cordova.callbacks[callbackId] = {success: success, fail: fail};
}
try {
// callbackOptions param represents additional optional parameters command could pass back, like keepCallback or
// custom callbackId, for example {callbackId: id, keepCallback: true, status: cordova.callbackStatus.JSON_EXCEPTION }
// CB-5806 [Windows8] Add keepCallback support to proxy
onSuccess = function (result, callbackOptions) {
callbackOptions = callbackOptions || {};
cordova.callbackSuccess(callbackOptions.callbackId || callbackId,
{
status: callbackOptions.status || cordova.callbackStatus.OK,
message: result,
keepCallback: callbackOptions.keepCallback || false
});
};
onError = function (err, callbackOptions) {
callbackOptions = callbackOptions || {};
cordova.callbackError(callbackOptions.callbackId || callbackId,
{
status: callbackOptions.status || cordova.callbackStatus.ERROR,
message: err,
keepCallback: callbackOptions.keepCallback || false
});
};
proxy(onSuccess, onError, args);
} catch (e) {
console.log("Exception calling native with command :: " + service + " :: " + action + " ::exception=" + e);
}
} else {
if (typeof fail === "function") {
fail("Missing Command Error");
}
}
};
});
// file: src/common/exec/proxy.js
define("cordova/exec/proxy", function(require, exports, module) {
// internal map of proxy function
var CommandProxyMap = {};
module.exports = {
// example: cordova.commandProxy.add("Accelerometer",{getCurrentAcceleration: function(successCallback, errorCallback, options) {...},...);
add:function(id,proxyObj) {
console.log("adding proxy for " + id);
CommandProxyMap[id] = proxyObj;
return proxyObj;
},
// cordova.commandProxy.remove("Accelerometer");
remove:function(id) {
var proxy = CommandProxyMap[id];
delete CommandProxyMap[id];
CommandProxyMap[id] = null;
return proxy;
},
get:function(service,action) {
return ( CommandProxyMap[service] ? CommandProxyMap[service][action] : null );
}
};
});
// file: src/common/init.js
define("cordova/init", function(require, exports, module) {
var channel = require('cordova/channel');
var cordova = require('cordova');
var modulemapper = require('cordova/modulemapper');
var platform = require('cordova/platform');
var pluginloader = require('cordova/pluginloader');
var utils = require('cordova/utils');
var platformInitChannelsArray = [channel.onNativeReady, channel.onPluginsReady];
function logUnfiredChannels(arr) {
for (var i = 0; i < arr.length; ++i) {
if (arr[i].state != 2) {
console.log('Channel not fired: ' + arr[i].type);
}
}
}
window.setTimeout(function() {
if (channel.onDeviceReady.state != 2) {
console.log('deviceready has not fired after 5 seconds.');
logUnfiredChannels(platformInitChannelsArray);
logUnfiredChannels(channel.deviceReadyChannelsArray);
}
}, 5000);
// Replace navigator before any modules are required(), to ensure it happens as soon as possible.
// We replace it so that properties that can't be clobbered can instead be overridden.
function replaceNavigator(origNavigator) {
var CordovaNavigator = function() {};
CordovaNavigator.prototype = origNavigator;
var newNavigator = new CordovaNavigator();
// This work-around really only applies to new APIs that are newer than Function.bind.
// Without it, APIs such as getGamepads() break.
if (CordovaNavigator.bind) {
for (var key in origNavigator) {
if (typeof origNavigator[key] == 'function') {
newNavigator[key] = origNavigator[key].bind(origNavigator);
}
else {
(function(k) {
utils.defineGetterSetter(newNavigator,key,function() {
return origNavigator[k];
});
})(key);
}
}
}
return newNavigator;
}
if (window.navigator) {
window.navigator = replaceNavigator(window.navigator);
}
if (!window.console) {
window.console = {
log: function(){}
};
}
if (!window.console.warn) {
window.console.warn = function(msg) {
this.log("warn: " + msg);
};
}
// Register pause, resume and deviceready channels as events on document.
channel.onPause = cordova.addDocumentEventHandler('pause');
channel.onResume = cordova.addDocumentEventHandler('resume');
channel.onDeviceReady = cordova.addStickyDocumentEventHandler('deviceready');
// Listen for DOMContentLoaded and notify our channel subscribers.
if (document.readyState == 'complete' || document.readyState == 'interactive') {
channel.onDOMContentLoaded.fire();
} else {
document.addEventListener('DOMContentLoaded', function() {
channel.onDOMContentLoaded.fire();
}, false);
}
// _nativeReady is global variable that the native side can set
// to signify that the native code is ready. It is a global since
// it may be called before any cordova JS is ready.
if (window._nativeReady) {
channel.onNativeReady.fire();
}
modulemapper.clobbers('cordova', 'cordova');
modulemapper.clobbers('cordova/exec', 'cordova.exec');
modulemapper.clobbers('cordova/exec', 'Cordova.exec');
// Call the platform-specific initialization.
platform.bootstrap && platform.bootstrap();
// Wrap in a setTimeout to support the use-case of having plugin JS appended to cordova.js.
// The delay allows the attached modules to be defined before the plugin loader looks for them.
setTimeout(function() {
pluginloader.load(function() {
channel.onPluginsReady.fire();
});
}, 0);
/**
* Create all cordova objects once native side is ready.
*/
channel.join(function() {
modulemapper.mapModules(window);
platform.initialize && platform.initialize();
// Fire event to notify that all objects are created
channel.onCordovaReady.fire();
// Fire onDeviceReady event once page has fully loaded, all
// constructors have run and cordova info has been received from native
// side.
channel.join(function() {
require('cordova').fireDocumentEvent('deviceready');
}, channel.deviceReadyChannelsArray);
}, platformInitChannelsArray);
});
// file: src/common/init_b.js
define("cordova/init_b", function(require, exports, module) {
var channel = require('cordova/channel');
var cordova = require('cordova');
var platform = require('cordova/platform');
var utils = require('cordova/utils');
var platformInitChannelsArray = [channel.onDOMContentLoaded, channel.onNativeReady];
// setting exec
cordova.exec = require('cordova/exec');
function logUnfiredChannels(arr) {
for (var i = 0; i < arr.length; ++i) {
if (arr[i].state != 2) {
console.log('Channel not fired: ' + arr[i].type);
}
}
}
window.setTimeout(function() {
if (channel.onDeviceReady.state != 2) {
console.log('deviceready has not fired after 5 seconds.');
logUnfiredChannels(platformInitChannelsArray);
logUnfiredChannels(channel.deviceReadyChannelsArray);
}
}, 5000);
// Replace navigator before any modules are required(), to ensure it happens as soon as possible.
// We replace it so that properties that can't be clobbered can instead be overridden.
function replaceNavigator(origNavigator) {
var CordovaNavigator = function() {};
CordovaNavigator.prototype = origNavigator;
var newNavigator = new CordovaNavigator();
// This work-around really only applies to new APIs that are newer than Function.bind.
// Without it, APIs such as getGamepads() break.
if (CordovaNavigator.bind) {
for (var key in origNavigator) {
if (typeof origNavigator[key] == 'function') {
newNavigator[key] = origNavigator[key].bind(origNavigator);
}
else {
(function(k) {
utils.defineGetterSetter(newNavigator,key,function() {
return origNavigator[k];
});
})(key);
}
}
}
return newNavigator;
}
if (window.navigator) {
window.navigator = replaceNavigator(window.navigator);
}
if (!window.console) {
window.console = {
log: function(){}
};
}
if (!window.console.warn) {
window.console.warn = function(msg) {
this.log("warn: " + msg);
};
}
// Register pause, resume and deviceready channels as events on document.
channel.onPause = cordova.addDocumentEventHandler('pause');
channel.onResume = cordova.addDocumentEventHandler('resume');
channel.onDeviceReady = cordova.addStickyDocumentEventHandler('deviceready');
// Listen for DOMContentLoaded and notify our channel subscribers.
if (document.readyState == 'complete' || document.readyState == 'interactive') {
channel.onDOMContentLoaded.fire();
} else {
document.addEventListener('DOMContentLoaded', function() {
channel.onDOMContentLoaded.fire();
}, false);
}
// _nativeReady is global variable that the native side can set
// to signify that the native code is ready. It is a global since
// it may be called before any cordova JS is ready.
if (window._nativeReady) {
channel.onNativeReady.fire();
}
// Call the platform-specific initialization.
platform.bootstrap && platform.bootstrap();
/**
* Create all cordova objects once native side is ready.
*/
channel.join(function() {
platform.initialize && platform.initialize();
// Fire event to notify that all objects are created
channel.onCordovaReady.fire();
// Fire onDeviceReady event once page has fully loaded, all
// constructors have run and cordova info has been received from native
// side.
channel.join(function() {
require('cordova').fireDocumentEvent('deviceready');
}, channel.deviceReadyChannelsArray);
}, platformInitChannelsArray);
});
// file: src/common/modulemapper.js
define("cordova/modulemapper", function(require, exports, module) {
var builder = require('cordova/builder'),
moduleMap = define.moduleMap,
symbolList,
deprecationMap;
exports.reset = function() {
symbolList = [];
deprecationMap = {};
};
function addEntry(strategy, moduleName, symbolPath, opt_deprecationMessage) {
if (!(moduleName in moduleMap)) {
throw new Error('Module ' + moduleName + ' does not exist.');
}
symbolList.push(strategy, moduleName, symbolPath);
if (opt_deprecationMessage) {
deprecationMap[symbolPath] = opt_deprecationMessage;
}
}
// Note: Android 2.3 does have Function.bind().
exports.clobbers = function(moduleName, symbolPath, opt_deprecationMessage) {
addEntry('c', moduleName, symbolPath, opt_deprecationMessage);
};
exports.merges = function(moduleName, symbolPath, opt_deprecationMessage) {
addEntry('m', moduleName, symbolPath, opt_deprecationMessage);
};
exports.defaults = function(moduleName, symbolPath, opt_deprecationMessage) {
addEntry('d', moduleName, symbolPath, opt_deprecationMessage);
};
exports.runs = function(moduleName) {
addEntry('r', moduleName, null);
};
function prepareNamespace(symbolPath, context) {
if (!symbolPath) {
return context;
}
var parts = symbolPath.split('.');
var cur = context;
for (var i = 0, part; part = parts[i]; ++i) {
cur = cur[part] = cur[part] || {};
}
return cur;
}
exports.mapModules = function(context) {
var origSymbols = {};
context.CDV_origSymbols = origSymbols;
for (var i = 0, len = symbolList.length; i < len; i += 3) {
var strategy = symbolList[i];
var moduleName = symbolList[i + 1];
var module = require(moduleName);
// <runs/>
if (strategy == 'r') {
continue;
}
var symbolPath = symbolList[i + 2];
var lastDot = symbolPath.lastIndexOf('.');
var namespace = symbolPath.substr(0, lastDot);
var lastName = symbolPath.substr(lastDot + 1);
var deprecationMsg = symbolPath in deprecationMap ? 'Access made to deprecated symbol: ' + symbolPath + '. ' + deprecationMsg : null;
var parentObj = prepareNamespace(namespace, context);
var target = parentObj[lastName];
if (strategy == 'm' && target) {
builder.recursiveMerge(target, module);
} else if ((strategy == 'd' && !target) || (strategy != 'd')) {
if (!(symbolPath in origSymbols)) {
origSymbols[symbolPath] = target;
}
builder.assignOrWrapInDeprecateGetter(parentObj, lastName, module, deprecationMsg);
}
}
};
exports.getOriginalSymbol = function(context, symbolPath) {
var origSymbols = context.CDV_origSymbols;
if (origSymbols && (symbolPath in origSymbols)) {
return origSymbols[symbolPath];
}
var parts = symbolPath.split('.');
var obj = context;
for (var i = 0; i < parts.length; ++i) {
obj = obj && obj[parts[i]];
}
return obj;
};
exports.reset();
});
// file: src/windows/platform.js
define("cordova/platform", function(require, exports, module) {
module.exports = {
// for backward compatibility we report 'windows8' when run on Windows 8.0 and
// 'windows' for Windows 8.1 and Windows Phone 8.1
id: (navigator.appVersion.indexOf("MSAppHost/1.0") !== -1) ? 'windows8' : 'windows',
bootstrap:function() {
var cordova = require('cordova'),
exec = require('cordova/exec'),
channel = cordova.require('cordova/channel'),
modulemapper = require('cordova/modulemapper');
modulemapper.clobbers('cordova/exec/proxy', 'cordova.commandProxy');
channel.onNativeReady.fire();
var onWinJSReady = function () {
var app = WinJS.Application;
var checkpointHandler = function checkpointHandler() {
cordova.fireDocumentEvent('pause',null,true);
};
var resumingHandler = function resumingHandler() {
cordova.fireDocumentEvent('resume',null,true);
};
app.addEventListener("checkpoint", checkpointHandler);
Windows.UI.WebUI.WebUIApplication.addEventListener("resuming", resumingHandler, false);
var activatedHandler = function (args) {channel.deviceready.subscribe(function () {app.queueEvent(args);});};app.addEventListener('activated', activatedHandler, false);document.addEventListener('deviceready', function () {app.removeEventListener('activated', activatedHandler);}, false);
app.start();
};
if (!window.WinJS) {
var scriptElem = document.createElement("script");
if (navigator.appVersion.indexOf("Windows Phone 8.1;") !== -1) {
// windows phone 8.1 + Mobile IE 11
scriptElem.src = "//Microsoft.Phone.WinJS.2.1/js/base.js";
} else if (navigator.appVersion.indexOf("MSAppHost/2.0;") !== -1) {
// windows 8.1 + IE 11
scriptElem.src = "//Microsoft.WinJS.2.0/js/base.js";
} else {
// windows 8.0 + IE 10
scriptElem.src = "//Microsoft.WinJS.1.0/js/base.js";
}
scriptElem.addEventListener("load", onWinJSReady);
document.head.appendChild(scriptElem);
}
else {
onWinJSReady();
}
}
};
});
// file: src/common/pluginloader.js
define("cordova/pluginloader", function(require, exports, module) {
var modulemapper = require('cordova/modulemapper');
var urlutil = require('cordova/urlutil');
// Helper function to inject a <script> tag.
// Exported for testing.
exports.injectScript = function(url, onload, onerror) {
var script = document.createElement("script");
// onload fires even when script fails loads with an error.
script.onload = onload;
// onerror fires for malformed URLs.
script.onerror = onerror;
script.src = url;
document.head.appendChild(script);
};
function injectIfNecessary(id, url, onload, onerror) {
onerror = onerror || onload;
if (id in define.moduleMap) {
onload();
} else {
exports.injectScript(url, function() {
if (id in define.moduleMap) {
onload();
} else {
onerror();
}
}, onerror);
}
}
function onScriptLoadingComplete(moduleList, finishPluginLoading) {
// Loop through all the plugins and then through their clobbers and merges.
for (var i = 0, module; module = moduleList[i]; i++) {
if (module.clobbers && module.clobbers.length) {
for (var j = 0; j < module.clobbers.length; j++) {
modulemapper.clobbers(module.id, module.clobbers[j]);
}
}
if (module.merges && module.merges.length) {
for (var k = 0; k < module.merges.length; k++) {
modulemapper.merges(module.id, module.merges[k]);
}
}
// Finally, if runs is truthy we want to simply require() the module.
if (module.runs) {
modulemapper.runs(module.id);
}
}
finishPluginLoading();
}
// Handler for the cordova_plugins.js content.
// See plugman's plugin_loader.js for the details of this object.
// This function is only called if the really is a plugins array that isn't empty.
// Otherwise the onerror response handler will just call finishPluginLoading().
function handlePluginsObject(path, moduleList, finishPluginLoading) {
// Now inject the scripts.
var scriptCounter = moduleList.length;
if (!scriptCounter) {
finishPluginLoading();
return;
}
function scriptLoadedCallback() {
if (!--scriptCounter) {
onScriptLoadingComplete(moduleList, finishPluginLoading);
}
}
for (var i = 0; i < moduleList.length; i++) {
injectIfNecessary(moduleList[i].id, path + moduleList[i].file, scriptLoadedCallback);
}
}
function findCordovaPath() {
var path = null;
var scripts = document.getElementsByTagName('script');
var term = '/cordova.js';
for (var n = scripts.length-1; n>-1; n--) {
var src = scripts[n].src.replace(/\?.*$/, ''); // Strip any query param (CB-6007).
if (src.indexOf(term) == (src.length - term.length)) {
path = src.substring(0, src.length - term.length) + '/';
break;
}
}
return path;
}
// Tries to load all plugins' js-modules.
// This is an async process, but onDeviceReady is blocked on onPluginsReady.
// onPluginsReady is fired when there are no plugins to load, or they are all done.
exports.load = function(callback) {
var pathPrefix = findCordovaPath();
if (pathPrefix === null) {
console.log('Could not find cordova.js script tag. Plugin loading may fail.');
pathPrefix = '';
}
injectIfNecessary('cordova/plugin_list', pathPrefix + 'cordova_plugins.js', function() {
var moduleList = require("cordova/plugin_list");
handlePluginsObject(pathPrefix, moduleList, callback);
}, callback);
};
});
// file: src/common/urlutil.js
define("cordova/urlutil", function(require, exports, module) {
/**
* For already absolute URLs, returns what is passed in.
* For relative URLs, converts them to absolute ones.
*/
exports.makeAbsolute = function makeAbsolute(url) {
var anchorEl = document.createElement('a');
anchorEl.href = url;
return anchorEl.href;
};
});
// file: src/common/utils.js
define("cordova/utils", function(require, exports, module) {
var utils = exports;
/**
* Defines a property getter / setter for obj[key].
*/
utils.defineGetterSetter = function(obj, key, getFunc, opt_setFunc) {
if (Object.defineProperty) {
var desc = {
get: getFunc,
configurable: true
};
if (opt_setFunc) {
desc.set = opt_setFunc;
}
Object.defineProperty(obj, key, desc);
} else {
obj.__defineGetter__(key, getFunc);
if (opt_setFunc) {
obj.__defineSetter__(key, opt_setFunc);
}
}
};
/**
* Defines a property getter for obj[key].
*/
utils.defineGetter = utils.defineGetterSetter;
utils.arrayIndexOf = function(a, item) {
if (a.indexOf) {
return a.indexOf(item);
}
var len = a.length;
for (var i = 0; i < len; ++i) {
if (a[i] == item) {
return i;
}
}
return -1;
};
/**
* Returns whether the item was found in the array.
*/
utils.arrayRemove = function(a, item) {
var index = utils.arrayIndexOf(a, item);
if (index != -1) {
a.splice(index, 1);
}
return index != -1;
};
utils.typeName = function(val) {
return Object.prototype.toString.call(val).slice(8, -1);
};
/**
* Returns an indication of whether the argument is an array or not
*/
utils.isArray = function(a) {
return utils.typeName(a) == 'Array';
};
/**
* Returns an indication of whether the argument is a Date or not
*/
utils.isDate = function(d) {
return utils.typeName(d) == 'Date';
};
/**
* Does a deep clone of the object.
*/
utils.clone = function(obj) {
if(!obj || typeof obj == 'function' || utils.isDate(obj) || typeof obj != 'object') {
return obj;
}
var retVal, i;
if(utils.isArray(obj)){
retVal = [];
for(i = 0; i < obj.length; ++i){
retVal.push(utils.clone(obj[i]));
}
return retVal;
}
retVal = {};
for(i in obj){
if(!(i in retVal) || retVal[i] != obj[i]) {
retVal[i] = utils.clone(obj[i]);
}
}
return retVal;
};
/**
* Returns a wrapped version of the function
*/
utils.close = function(context, func, params) {
if (typeof params == 'undefined') {
return function() {
return func.apply(context, arguments);
};
} else {
return function() {
return func.apply(context, params);
};
}
};
/**
* Create a UUID
*/
utils.createUUID = function() {
return UUIDcreatePart(4) + '-' +
UUIDcreatePart(2) + '-' +
UUIDcreatePart(2) + '-' +
UUIDcreatePart(2) + '-' +
UUIDcreatePart(6);
};
/**
* Extends a child object from a parent object using classical inheritance
* pattern.
*/
utils.extend = (function() {
// proxy used to establish prototype chain
var F = function() {};
// extend Child from Parent
return function(Child, Parent) {
F.prototype = Parent.prototype;
Child.prototype = new F();
Child.__super__ = Parent.prototype;
Child.prototype.constructor = Child;
};
}());
/**
* Alerts a message in any available way: alert or console.log.
*/
utils.alert = function(msg) {
if (window.alert) {
window.alert(msg);
} else if (console && console.log) {
console.log(msg);
}
};
//------------------------------------------------------------------------------
function UUIDcreatePart(length) {
var uuidpart = "";
for (var i=0; i<length; i++) {
var uuidchar = parseInt((Math.random() * 256), 10).toString(16);
if (uuidchar.length == 1) {
uuidchar = "0" + uuidchar;
}
uuidpart += uuidchar;
}
return uuidpart;
}
});
window.cordova = require('cordova');
// file: src/scripts/bootstrap.js
require('cordova/init');
})();
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup />
<ReferenceCachePath>C:\Users\sebastian\AppData\Local\Temp\yxmokjnx_CordovaApp.Phone_refcache</ReferenceCachePath>
<AutoRefresh>true</AutoRefresh>
</PropertyGroup>
</Project> </Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ReferenceCachePath>C:\Users\sebastian\AppData\Local\Temp\anloqo42_CordovaApp.Windows_refcache</ReferenceCachePath>
</PropertyGroup>
</Project>
\ No newline at end of file
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
specific language governing permissions and limitations specific language governing permissions and limitations
under the License. under the License.
--> -->
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<OutputPath>build\windows80\$(Configuration)\$(Platform)\</OutputPath> <OutputPath>build\windows80\$(Configuration)\$(Platform)\</OutputPath>
<IntermediateOutputPath>build\windows80\bld\</IntermediateOutputPath> <IntermediateOutputPath>build\windows80\bld\</IntermediateOutputPath>
...@@ -59,18 +59,15 @@ ...@@ -59,18 +59,15 @@
<PropertyGroup Label="Globals"> <PropertyGroup Label="Globals">
<ProjectGuid>efffab2f-bfc5-4eda-b545-45ef4995f55a</ProjectGuid> <ProjectGuid>efffab2f-bfc5-4eda-b545-45ef4995f55a</ProjectGuid>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Label="Configuration"> <PropertyGroup Condition="'$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '11.0'">
<MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion> <VisualStudioVersion>11.0</VisualStudioVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '12.0'">
<VisualStudioVersion>12.0</VisualStudioVersion>
</PropertyGroup> </PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).Default.props" /> <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).Default.props" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).props" /> <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).props" />
<PropertyGroup> <PropertyGroup>
<TargetPlatformIdentifier>Windows</TargetPlatformIdentifier> <TargetPlatformIdentifier>Windows</TargetPlatformIdentifier>
<TargetPlatformVersion>8.1</TargetPlatformVersion> <TargetPlatformVersion>8.0</TargetPlatformVersion>
<DefaultLanguage>en-US</DefaultLanguage> <DefaultLanguage>en-US</DefaultLanguage>
<PackageCertificateKeyFile>CordovaApp_TemporaryKey.pfx</PackageCertificateKeyFile> <PackageCertificateKeyFile>CordovaApp_TemporaryKey.pfx</PackageCertificateKeyFile>
</PropertyGroup> </PropertyGroup>
...@@ -82,7 +79,7 @@ ...@@ -82,7 +79,7 @@
<None Include="CordovaApp_TemporaryKey.pfx" /> <None Include="CordovaApp_TemporaryKey.pfx" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<SDKReference Include="Microsoft.WinJS.2.0, Version=1.0" /> <SDKReference Include="Microsoft.WinJS.1.0, Version=1.0" />
</ItemGroup> </ItemGroup>
<Import Project="CordovaApp.projitems" Label="Shared" /> <Import Project="CordovaApp.projitems" Label="Shared" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).targets" /> <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).targets" />
......
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
Weitere Informationen zu Paketmanifestdateien finden Sie unter http://go.microsoft.com/fwlink/?LinkID=241727 Weitere Informationen zu Paketmanifestdateien finden Sie unter http://go.microsoft.com/fwlink/?LinkID=241727
--> -->
<Identity Name="e8de53c0-cf2d-11e4-8bb0-9369d008f7b1" Version="1.0.0.0" Publisher="CN=$username$" ProcessorArchitecture="neutral" /> <Identity Name="c05631e0-de03-11e4-96be-cfbf5b6cb232" Version="1.0.0.0" Publisher="CN=$username$" ProcessorArchitecture="neutral" />
<mp:PhoneIdentity PhoneProductId="e8de53c0-cf2d-11e4-8bb0-9369d008f7b1" PhonePublisherId="db093ed5-53b1-45f7-af72-751e8f36ab80" /> <mp:PhoneIdentity PhoneProductId="c05631e0-de03-11e4-96be-cfbf5b6cb232" PhonePublisherId="db093ed5-53b1-45f7-af72-751e8f36ab80" />
<Properties> <Properties>
<DisplayName>NotificationExample</DisplayName> <DisplayName>NotificationExample</DisplayName>
<PublisherDisplayName>$username$</PublisherDisplayName> <PublisherDisplayName>$username$</PublisherDisplayName>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<TargetPlatformIdentifier>WindowsPhoneApp</TargetPlatformIdentifier> <TargetPlatformIdentifier>WindowsPhoneApp</TargetPlatformIdentifier>
<SolutionConfiguration>Debug|AnyCPU</SolutionConfiguration> <SolutionConfiguration>Debug|AnyCPU</SolutionConfiguration>
<PackageArchitecture>neutral</PackageArchitecture> <PackageArchitecture>neutral</PackageArchitecture>
<PackageIdentityName>e8de53c0-cf2d-11e4-8bb0-9369d008f7b1</PackageIdentityName> <PackageIdentityName>c05631e0-de03-11e4-96be-cfbf5b6cb232</PackageIdentityName>
<IntermediateOutputPath>Y:\Documents\github\cordova-example-local-notifications\platforms\windows\build\phone\bld\</IntermediateOutputPath> <IntermediateOutputPath>Y:\Documents\github\cordova-example-local-notifications\platforms\windows\build\phone\bld\</IntermediateOutputPath>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
...@@ -79,6 +79,12 @@ ...@@ -79,6 +79,12 @@
<AppxPackagedFile Include="Y:\Documents\github\cordova-example-local-notifications\platforms\windows\www\js\index.js"> <AppxPackagedFile Include="Y:\Documents\github\cordova-example-local-notifications\platforms\windows\www\js\index.js">
<PackagePath>www\js\index.js</PackagePath> <PackagePath>www\js\index.js</PackagePath>
</AppxPackagedFile> </AppxPackagedFile>
<AppxPackagedFile Include="Y:\Documents\github\cordova-example-local-notifications\platforms\windows\www\plugins\de.appplant.cordova.plugin.email-composer\src\windows\EmailComposerProxy.js">
<PackagePath>www\plugins\de.appplant.cordova.plugin.email-composer\src\windows\EmailComposerProxy.js</PackagePath>
</AppxPackagedFile>
<AppxPackagedFile Include="Y:\Documents\github\cordova-example-local-notifications\platforms\windows\www\plugins\de.appplant.cordova.plugin.email-composer\www\email_composer.js">
<PackagePath>www\plugins\de.appplant.cordova.plugin.email-composer\www\email_composer.js</PackagePath>
</AppxPackagedFile>
<AppxPackagedFile Include="Y:\Documents\github\cordova-example-local-notifications\platforms\windows\www\plugins\de.appplant.cordova.plugin.local-notification\src\windows\LocalNotificationCore.js"> <AppxPackagedFile Include="Y:\Documents\github\cordova-example-local-notifications\platforms\windows\www\plugins\de.appplant.cordova.plugin.local-notification\src\windows\LocalNotificationCore.js">
<PackagePath>www\plugins\de.appplant.cordova.plugin.local-notification\src\windows\LocalNotificationCore.js</PackagePath> <PackagePath>www\plugins\de.appplant.cordova.plugin.local-notification\src\windows\LocalNotificationCore.js</PackagePath>
</AppxPackagedFile> </AppxPackagedFile>
......
...@@ -19,6 +19,8 @@ www\css\index.css ...@@ -19,6 +19,8 @@ www\css\index.css
www\img\logo.png www\img\logo.png
www\index.html www\index.html
www\js\index.js www\js\index.js
www\plugins\de.appplant.cordova.plugin.email-composer\src\windows\EmailComposerProxy.js
www\plugins\de.appplant.cordova.plugin.email-composer\www\email_composer.js
www\plugins\de.appplant.cordova.plugin.local-notification\src\windows\LocalNotificationCore.js www\plugins\de.appplant.cordova.plugin.local-notification\src\windows\LocalNotificationCore.js
www\plugins\de.appplant.cordova.plugin.local-notification\src\windows\LocalNotificationProxy.js www\plugins\de.appplant.cordova.plugin.local-notification\src\windows\LocalNotificationProxy.js
www\plugins\de.appplant.cordova.plugin.local-notification\src\windows\LocalNotificationUtil.js www\plugins\de.appplant.cordova.plugin.local-notification\src\windows\LocalNotificationUtil.js
......
...@@ -19,6 +19,8 @@ www\css\index.css ...@@ -19,6 +19,8 @@ www\css\index.css
www\img\logo.png www\img\logo.png
www\index.html www\index.html
www\js\index.js www\js\index.js
www\plugins\de.appplant.cordova.plugin.email-composer\src\windows\EmailComposerProxy.js
www\plugins\de.appplant.cordova.plugin.email-composer\www\email_composer.js
www\plugins\de.appplant.cordova.plugin.local-notification\src\windows\LocalNotificationCore.js www\plugins\de.appplant.cordova.plugin.local-notification\src\windows\LocalNotificationCore.js
www\plugins\de.appplant.cordova.plugin.local-notification\src\windows\LocalNotificationProxy.js www\plugins\de.appplant.cordova.plugin.local-notification\src\windows\LocalNotificationProxy.js
www\plugins\de.appplant.cordova.plugin.local-notification\src\windows\LocalNotificationUtil.js www\plugins\de.appplant.cordova.plugin.local-notification\src\windows\LocalNotificationUtil.js
......
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
under the License. under the License.
--> -->
<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest" xmlns:m2="http://schemas.microsoft.com/appx/2013/manifest" xmlns:m3="http://schemas.microsoft.com/appx/2014/manifest" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"> <Package xmlns="http://schemas.microsoft.com/appx/2010/manifest" xmlns:m2="http://schemas.microsoft.com/appx/2013/manifest" xmlns:m3="http://schemas.microsoft.com/appx/2014/manifest" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest">
<Identity Name="e8de53c0-cf2d-11e4-8bb0-9369d008f7b1" Version="1.0.0.0" Publisher="CN=$username$" /> <Identity Name="c05631e0-de03-11e4-96be-cfbf5b6cb232" Version="1.0.0.0" Publisher="CN=$username$" />
<mp:PhoneIdentity PhoneProductId="e8de53c0-cf2d-11e4-8bb0-9369d008f7b1" PhonePublisherId="db093ed5-53b1-45f7-af72-751e8f36ab80" /> <mp:PhoneIdentity PhoneProductId="c05631e0-de03-11e4-96be-cfbf5b6cb232" PhonePublisherId="db093ed5-53b1-45f7-af72-751e8f36ab80" />
<Properties> <Properties>
<DisplayName>NotificationExample</DisplayName> <DisplayName>NotificationExample</DisplayName>
<PublisherDisplayName>$username$</PublisherDisplayName> <PublisherDisplayName>$username$</PublisherDisplayName>
...@@ -34,8 +34,14 @@ ...@@ -34,8 +34,14 @@
</Resources> </Resources>
<Applications> <Applications>
<Application Id="de.appplant.localnotification.example" StartPage="www/index.html"> <Application Id="de.appplant.localnotification.example" StartPage="www/index.html">
<m3:VisualElements ToastCapable="true" DisplayName="NotificationExample" Square150x150Logo="images\Square150x150Logo.png" Square44x44Logo="images\Square44x44Logo.png" Description="CordovaApp" ForegroundText="light" BackgroundColor="transparent"> <m3:VisualElements ToastCapable="true" DisplayName="NotificationExample"
<m3:DefaultTile Wide310x150Logo="images\Wide310x150Logo.png" Square71x71Logo="images\Square71x71Logo.png"> Square150x150Logo="images\Square150x150Logo.png"
Square44x44Logo="images\Square44x44Logo.png"
Description="CordovaApp"
ForegroundText="light"
BackgroundColor="transparent">
<m3:DefaultTile Wide310x150Logo="images\Wide310x150Logo.png"
Square71x71Logo="images\Square71x71Logo.png">
<m3:ShowNameOnTiles> <m3:ShowNameOnTiles>
<m3:ShowOn Tile="square150x150Logo" /> <m3:ShowOn Tile="square150x150Logo" />
<m3:ShowOn Tile="wide310x150Logo" /> <m3:ShowOn Tile="wide310x150Logo" />
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
under the License. under the License.
--> -->
<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest" xmlns:m2="http://schemas.microsoft.com/appx/2013/manifest"> <Package xmlns="http://schemas.microsoft.com/appx/2010/manifest" xmlns:m2="http://schemas.microsoft.com/appx/2013/manifest">
<Identity Name="e8de53c0-cf2d-11e4-8bb0-9369d008f7b1" Version="1.0.0.0" Publisher="CN=$username$" /> <Identity Name="c05631e0-de03-11e4-96be-cfbf5b6cb232" Version="1.0.0.0" Publisher="CN=$username$" />
<Properties> <Properties>
<DisplayName>NotificationExample</DisplayName> <DisplayName>NotificationExample</DisplayName>
<PublisherDisplayName>$username$</PublisherDisplayName> <PublisherDisplayName>$username$</PublisherDisplayName>
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
</Resources> </Resources>
<Applications> <Applications>
<Application Id="de.appplant.localnotification.example" StartPage="www/index.html"> <Application Id="de.appplant.localnotification.example" StartPage="www/index.html">
<m2:VisualElements DisplayName="NotificationExample" <m2:VisualElements ToastCapable="true" DisplayName="NotificationExample"
Description="CordovaApp" Description="CordovaApp"
ForegroundText="light" ForegroundText="light"
BackgroundColor="#464646" BackgroundColor="#464646"
......
...@@ -17,31 +17,31 @@ ...@@ -17,31 +17,31 @@
specific language governing permissions and limitations specific language governing permissions and limitations
under the License. under the License.
--> -->
<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest" xmlns:m2="http://schemas.microsoft.com/appx/2013/manifest"> <Package xmlns="http://schemas.microsoft.com/appx/2010/manifest">
<Identity Name="e8de53c0-cf2d-11e4-8bb0-9369d008f7b1" Version="1.1.0.0" Publisher="CN=$username$" /> <Identity Name="c05631e0-de03-11e4-96be-cfbf5b6cb232" Version="1.0.0.0" Publisher="CN=$username$" />
<Properties> <Properties>
<DisplayName>NotificationExample</DisplayName> <DisplayName>NotificationExample</DisplayName>
<PublisherDisplayName>$username$</PublisherDisplayName> <PublisherDisplayName>$username$</PublisherDisplayName>
<Logo>images\storelogo.png</Logo> <Logo>images\storelogo.png</Logo>
</Properties> </Properties>
<Prerequisites> <Prerequisites>
<OSMinVersion>6.3.0</OSMinVersion> <OSMinVersion>6.2.1</OSMinVersion>
<OSMaxVersionTested>6.3.0</OSMaxVersionTested> <OSMaxVersionTested>6.2.1</OSMaxVersionTested>
</Prerequisites> </Prerequisites>
<Resources> <Resources>
<Resource Language="x-generate" /> <Resource Language="x-generate" />
</Resources> </Resources>
<Applications> <Applications>
<Application Id="de.appplant.localnotification.example" StartPage="www/index.html"> <Application Id="de.appplant.localnotification.example" StartPage="www/index.html">
<m2:VisualElements DisplayName="NotificationExample" Description="CordovaApp" BackgroundColor="#464646" ForegroundText="light" Square150x150Logo="images\Square150x150Logo.png" Square30x30Logo="images\Square30x30Logo.png"> <VisualElements ToastCapable="true" DisplayName="NotificationExample"
<m2:DefaultTile Wide310x150Logo="images\Wide310x150Logo.png"> Logo="images\Square150x150Logo.png"
<m2:ShowNameOnTiles> SmallLogo="images\Square30x30Logo.png"
<m2:ShowOn Tile="square150x150Logo" /> Description="CordovaApp"
<m2:ShowOn Tile="wide310x150Logo" /> ForegroundText="light"
</m2:ShowNameOnTiles> BackgroundColor="#464646">
</m2:DefaultTile> <DefaultTile ShowName="allLogos" WideLogo="images\Wide310x150Logo.png"/>
<m2:SplashScreen Image="images\splashscreen.png" /> <SplashScreen Image="images\splashscreen.png" />
</m2:VisualElements> </VisualElements>
</Application> </Application>
</Applications> </Applications>
<Capabilities> <Capabilities>
......
...@@ -1298,7 +1298,7 @@ module.exports = { ...@@ -1298,7 +1298,7 @@ module.exports = {
scriptElem.src = "//Microsoft.WinJS.2.0/js/base.js"; scriptElem.src = "//Microsoft.WinJS.2.0/js/base.js";
} else { } else {
// windows 8.0 + IE 10 // windows 8.0 + IE 10
scriptElem.src = "//Microsoft.WinJS.2.0/js/base.js"; scriptElem.src = "//Microsoft.WinJS.1.0/js/base.js";
} }
scriptElem.addEventListener("load", onWinJSReady); scriptElem.addEventListener("load", onWinJSReady);
document.head.appendChild(scriptElem); document.head.appendChild(scriptElem);
......
cordova.define('cordova/plugin_list', function(require, exports, module) { cordova.define('cordova/plugin_list', function(require, exports, module) {
module.exports = [ module.exports = [
{ {
"file": "plugins/nl.x-services.plugins.toast/www/Toast.js",
"id": "nl.x-services.plugins.toast.Toast",
"clobbers": [
"window.plugins.toast"
]
},
{
"file": "plugins/nl.x-services.plugins.toast/test/tests.js",
"id": "nl.x-services.plugins.toast.tests"
},
{
"file": "plugins/de.appplant.cordova.plugin.local-notification/www/local-notification.js", "file": "plugins/de.appplant.cordova.plugin.local-notification/www/local-notification.js",
"id": "de.appplant.cordova.plugin.local-notification.LocalNotification", "id": "de.appplant.cordova.plugin.local-notification.LocalNotification",
"clobbers": [ "clobbers": [
...@@ -57,6 +46,17 @@ module.exports = [ ...@@ -57,6 +46,17 @@ module.exports = [
] ]
}, },
{ {
"file": "plugins/nl.x-services.plugins.toast/www/Toast.js",
"id": "nl.x-services.plugins.toast.Toast",
"clobbers": [
"window.plugins.toast"
]
},
{
"file": "plugins/nl.x-services.plugins.toast/test/tests.js",
"id": "nl.x-services.plugins.toast.tests"
},
{
"file": "plugins/org.apache.cordova.device/www/device.js", "file": "plugins/org.apache.cordova.device/www/device.js",
"id": "org.apache.cordova.device.device", "id": "org.apache.cordova.device.device",
"clobbers": [ "clobbers": [
...@@ -74,8 +74,8 @@ module.exports = [ ...@@ -74,8 +74,8 @@ module.exports = [
module.exports.metadata = module.exports.metadata =
// TOP OF METADATA // TOP OF METADATA
{ {
"nl.x-services.plugins.toast": "2.0.3",
"de.appplant.cordova.plugin.local-notification": "0.8.2dev", "de.appplant.cordova.plugin.local-notification": "0.8.2dev",
"nl.x-services.plugins.toast": "2.0.3",
"org.apache.cordova.device": "0.3.0" "org.apache.cordova.device": "0.3.0"
} }
// BOTTOM OF METADATA // BOTTOM OF METADATA
......
...@@ -308,6 +308,7 @@ ...@@ -308,6 +308,7 @@
<!-- IDs --> <!-- IDs -->
<script type="text/javascript"> <script type="text/javascript">
var callbackIds = function (ids) { var callbackIds = function (ids) {
console.log(ids);
showToast(ids.length === 0 ? '- none -' : ids.join(' ,')); showToast(ids.length === 0 ? '- none -' : ids.join(' ,'));
}; };
...@@ -331,8 +332,13 @@ ...@@ -331,8 +332,13 @@
showToast(notifications.length === 0 ? '- none -' : notifications.join(' ,')); showToast(notifications.length === 0 ? '- none -' : notifications.join(' ,'));
}; };
var callbackSingleOpts = function (notification) {
console.log(notification);
showToast(notification.toString());
};
get = function () { get = function () {
cordova.plugins.notification.local.get(1, callbackOpts); cordova.plugins.notification.local.get(1, callbackSingleOpts);
}; };
getMultiple = function () { getMultiple = function () {
......
...@@ -200,7 +200,9 @@ exports.core = { ...@@ -200,7 +200,9 @@ exports.core = {
clearLocalNotification: function (id) { clearLocalNotification: function (id) {
var notification = this.getAll([id])[0]; var notification = this.getAll([id])[0];
try {
this.getToastHistory().remove('Toast' + id); this.getToastHistory().remove('Toast' + id);
} catch (e) {/*Only Phones support the NotificationHistory*/ }
if (this.isRepeating(notification)) if (this.isRepeating(notification))
return; return;
...@@ -220,7 +222,9 @@ exports.core = { ...@@ -220,7 +222,9 @@ exports.core = {
this.clearLocalNotification(ids[i]); this.clearLocalNotification(ids[i]);
} }
try {
this.getToastHistory().clear(); this.getToastHistory().clear();
} catch (e) {/*Only Phones support the NotificationHistory*/ }
this.fireEvent('clearall'); this.fireEvent('clearall');
}, },
...@@ -251,7 +255,9 @@ exports.core = { ...@@ -251,7 +255,9 @@ exports.core = {
history = this.getToastHistory(), history = this.getToastHistory(),
toasts = this.getScheduledToasts(); toasts = this.getScheduledToasts();
try {
history.remove('Toast' + id); history.remove('Toast' + id);
} catch (e) {/*Only Phones support the NotificationHistory*/ }
for (var i = 0; i < toasts.length; i++) { for (var i = 0; i < toasts.length; i++) {
var toast = toasts[i]; var toast = toasts[i];
...@@ -272,7 +278,9 @@ exports.core = { ...@@ -272,7 +278,9 @@ exports.core = {
this.cancelLocalNotification(ids[i]); this.cancelLocalNotification(ids[i]);
} }
try {
this.getToastHistory().clear(); this.getToastHistory().clear();
} catch (e) {/*Only Phones support the NotificationHistory*/ }
this.fireEvent('cancelall'); this.fireEvent('cancelall');
}, },
......
...@@ -86,20 +86,52 @@ exports.isRepeating = function (notification) { ...@@ -86,20 +86,52 @@ exports.isRepeating = function (notification) {
* @param {String} path * @param {String} path
* Relative path to sound resource * Relative path to sound resource
* *
* @return {String} URI to Sound-File * @return {String} XML Tag for Sound-File
*/ */
exports.parseSound = function (path) { exports.parseSound = function (path) {
if (!path.match(/^file/))
return '';
var uri = this.parseUri(path),
audio = "<audio src=" + uri + " loop='false'/>";
return audio;
};
/**
* Parses image file path.
*
* @param {String} path
* Relative path to image resource
*
* @return {String} XML-Tag for Image-File
*/
exports.parseImage = function (path) {
if (!path.match(/^file/))
return '';
var uri = this.parseUri(path),
image = "<image id='1' src=" + uri + " />";
return image;
};
/**
* Parses file path to URI.
*
* @param {String} path
* Relative path to a resource
*
* @return {String} URI to File
*/
exports.parseUri = function (path) {
var pkg = Windows.ApplicationModel.Package.current, var pkg = Windows.ApplicationModel.Package.current,
pkgId = pkg.id, pkgId = pkg.id,
pkgName = pkgId.name; pkgName = pkgId.name;
if (!path.match(/^file/)) var uri = "'ms-appx://" + pkgName + "/www" + path.slice(6, path.length) + "'";
return;
var sound = "'ms-appx://" + pkgName + "/www/" + path.slice(6, path.length) + "'",
audio = "<audio src=" + sound + " loop='false'/>";
return audio; return uri;
}; };
/** /**
...@@ -150,28 +182,38 @@ exports.buildToastTemplate = function (options) { ...@@ -150,28 +182,38 @@ exports.buildToastTemplate = function (options) {
sound = this.parseSound(options.sound); sound = this.parseSound(options.sound);
} }
var templateName = "ToastText",
imageNode;
if (options.icon && options.icon !== '') {
imageNode = this.parseImage(options.icon);
// template with Image
if (imageNode !== '') {
templateName = "ToastImageAndText";
};
} else {
imageNode = "";
}
var bindingNode;
if (title && title !== '') { if (title && title !== '') {
return "<toast>" + bindingNode = "<binding template='" + templateName + "02'>" +
"<visual>" + imageNode +
"<binding template='ToastText02'>" +
"<text id='1'>" + title + "</text>" + "<text id='1'>" + title + "</text>" +
"<text id='2'>" + message + "</text>" + "<text id='2'>" + message + "</text>" +
"</binding>" + "</binding>";
"</visual>" +
sound +
"<json>" + json + "</json>" +
"</toast>";
} else { } else {
bindingNode = "<binding template='" + templateName + "01'>" +
imageNode +
"<text id='1'>" + message + "</text>" +
"</binding>";
}
return "<toast>" + return "<toast>" +
"<visual>" + "<visual>" +
"<binding template='ToastText01'>" + bindingNode +
"<text id='1'>" + message + "</text>" +
"</binding>" +
"</visual>" + "</visual>" +
sound + sound +
"<json>" + json + "</json>" + "<json>" + json + "</json>" +
"</toast>"; "</toast>";
}
}; };
/** /**
......
...@@ -275,7 +275,8 @@ exports.get = function () { ...@@ -275,7 +275,8 @@ exports.get = function () {
scope = args[2]; scope = args[2];
if (!Array.isArray(ids)) { if (!Array.isArray(ids)) {
ids = [ids]; this.exec('getSingle', ids.toString(), callback, scope);
return;
} }
ids = this.convertIds(ids); ids = this.convertIds(ids);
...@@ -321,6 +322,11 @@ exports.getScheduled = function () { ...@@ -321,6 +322,11 @@ exports.getScheduled = function () {
ids = [ids]; ids = [ids];
} }
if (!Array.isArray(ids)) {
this.exec('getSingleScheduled', ids.toString(), callback, scope);
return;
}
ids = this.convertIds(ids); ids = this.convertIds(ids);
this.exec('getScheduled', ids, callback, scope); this.exec('getScheduled', ids, callback, scope);
...@@ -364,6 +370,11 @@ exports.getTriggered = function () { ...@@ -364,6 +370,11 @@ exports.getTriggered = function () {
ids = [ids]; ids = [ids];
} }
if (!Array.isArray(ids)) {
this.exec('getSingleTriggered', ids.toString(), callback, scope);
return;
}
ids = this.convertIds(ids); ids = this.convertIds(ids);
this.exec('getTriggered', ids, callback, scope); this.exec('getTriggered', ids, callback, scope);
......
...@@ -59,6 +59,10 @@ ...@@ -59,6 +59,10 @@
{ {
"xml": "<uses-permission android:name=\"android.permission.RECEIVE_BOOT_COMPLETED\" />", "xml": "<uses-permission android:name=\"android.permission.RECEIVE_BOOT_COMPLETED\" />",
"count": 1 "count": 1
},
{
"xml": "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\" />",
"count": 1
} }
] ]
} }
......
...@@ -30,8 +30,8 @@ For example, applications that depend on servers for messages or data can poll t ...@@ -30,8 +30,8 @@ For example, applications that depend on servers for messages or data can poll t
The current 0.8 branch supports the following platforms: The current 0.8 branch supports the following platforms:
- __iOS__ _(including iOS8)_<br> - __iOS__ _(including iOS8)_<br>
- __Android__ _(SDK >=7)_ - __Android__ _(SDK >=7)_
- __Windows 8.1__ _(added with v0.8.2)_
The partial support for WP8.0 has been dropped, but the Windows (Phone) 8.1 platform will be fully supported soon. - __Windows Phone 8.1__ _(added with v0.8.2)_
Find out more informations [here][wiki_platforms] in our wiki. Find out more informations [here][wiki_platforms] in our wiki.
......
...@@ -130,6 +130,7 @@ ...@@ -130,6 +130,7 @@
<config-file target="AndroidManifest.xml" parent="/manifest"> <config-file target="AndroidManifest.xml" parent="/manifest">
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
</config-file> </config-file>
<lib-file src="libs/android/android-support-v4.jar" /> <lib-file src="libs/android/android-support-v4.jar" />
......
#!/usr/bin/env node
/* /*
* Copyright (c) 2013-2015 by appPlant UG. All rights reserved. * Copyright (c) 2013-2015 by appPlant UG. All rights reserved.
* *
......
#!/usr/bin/env node #!/usr/bin/env node
// This Plugin-Hook sets ToastCapable on true to allow windows-platform /*
// cordova apps displaing local-notifications * Copyright (c) 2013-2015 by appPlant UG. All rights reserved.
*
* @APPPLANT_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apache License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. Please obtain a copy of the License at
* http://opensource.org/licenses/Apache-2.0/ and read it before using this
* file.
*
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
* Please see the License for the specific language governing rights and
* limitations under the License.
*
* @APPPLANT_LICENSE_HEADER_END@
*/
// Includes a snippet into the cordova-core js file
// to fire the activated event after device is ready
var fs = require('fs'), var fs = require('fs'),
rootdir = process.argv[2]; rootdir = process.argv[2];
...@@ -9,7 +34,17 @@ var fs = require('fs'), ...@@ -9,7 +34,17 @@ var fs = require('fs'),
if (!rootdir) if (!rootdir)
return; return;
function replace_string_in_file (filename, to_replace, replace_with) { /**
* Replaces a string with another one in a file.
*
* @param {String} path
* Absolute or relative file path from cordova root project.
* @param {String} to_replace
* The string to replace.
* @param {String}
* The string to replace with.
*/
function replace (filename, to_replace, replace_with) {
var data = fs.readFileSync(filename, 'utf8'), var data = fs.readFileSync(filename, 'utf8'),
result; result;
...@@ -20,6 +55,7 @@ function replace_string_in_file (filename, to_replace, replace_with) { ...@@ -20,6 +55,7 @@ function replace_string_in_file (filename, to_replace, replace_with) {
fs.writeFileSync(filename, result, 'utf8'); fs.writeFileSync(filename, result, 'utf8');
} }
// Fires the activated event again after device is ready
var snippet = var snippet =
"var activatedHandler = function (args) {" + "var activatedHandler = function (args) {" +
"channel.deviceready.subscribe(function () {" + "channel.deviceready.subscribe(function () {" +
...@@ -32,13 +68,13 @@ var snippet = ...@@ -32,13 +68,13 @@ var snippet =
"}, false);\n" + "}, false);\n" +
" app.start();"; " app.start();";
// Path to cordova-core js files where the snippet needs to be included
var files = [ var files = [
'platforms/windows/www/cordova.js', 'platforms/windows/www/cordova.js',
'platforms/windows/platform_www/cordova.js' 'platforms/windows/platform_www/cordova.js'
]; ];
// Includes the snippet before app.start() is called
for (var i = 0; i < files.length; i++) { for (var i = 0; i < files.length; i++) {
replace_string_in_file(files[i], 'app.start();', snippet); replace(files[i], 'app.start();', snippet);
} }
#!/usr/bin/env node #!/usr/bin/env node
// This Plugin-Hook sets ToastCapable on true to allow windows-platform /*
// cordova apps displaing local-notifications * Copyright (c) 2013-2015 by appPlant UG. All rights reserved.
*
* @APPPLANT_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apache License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. Please obtain a copy of the License at
* http://opensource.org/licenses/Apache-2.0/ and read it before using this
* file.
*
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
* Please see the License for the specific language governing rights and
* limitations under the License.
*
* @APPPLANT_LICENSE_HEADER_END@
*/
// Hook sets ToastCapable on true to enable local-notifications
var fs = require('fs'), var fs = require('fs'),
rootdir = process.argv[2]; rootdir = process.argv[2];
...@@ -9,11 +33,21 @@ var fs = require('fs'), ...@@ -9,11 +33,21 @@ var fs = require('fs'),
if (!rootdir) if (!rootdir)
return; return;
function replace_string_in_file (filename, to_replace, replace_with) { /**
* Replaces a string with another one in a file.
*
* @param {String} path
* Absolute or relative file path from cordova root project.
* @param {String} to_replace
* The string to replace.
* @param {String}
* The string to replace with.
*/
function replace (filename, to_replace, replace_with) {
var data = fs.readFileSync(filename, 'utf8'), var data = fs.readFileSync(filename, 'utf8'),
result; result;
if (data.indexOf(replace_with) > -1) if (data.indexOf('ToastCapable') > -1)
return; return;
result = data.replace(new RegExp(to_replace, 'g'), replace_with); result = data.replace(new RegExp(to_replace, 'g'), replace_with);
...@@ -21,13 +55,9 @@ function replace_string_in_file (filename, to_replace, replace_with) { ...@@ -21,13 +55,9 @@ function replace_string_in_file (filename, to_replace, replace_with) {
fs.writeFileSync(filename, result, 'utf8'); fs.writeFileSync(filename, result, 'utf8');
} }
// Set ToastCapable for Windows Phone
var manifests = [ replace('platforms/windows/package.phone.appxmanifest', '<m3:VisualElements', '<m3:VisualElements ToastCapable="true"');
'platforms/windows/package.phone.appxmanifest', // Set ToastCapable for Windows 8.1
'platforms/windows/package.windows.appxmanifest', replace('platforms/windows/package.windows.appxmanifest', '<m2:VisualElements', '<m2:VisualElements ToastCapable="true"');
'platforms/windows/package.windows80.appxmanifest' // Set ToastCapable for Windows 8.0
]; replace('platforms/windows/package.windows80.appxmanifest', '<VisualElements', '<VisualElements ToastCapable="true"');
for (var i = 0; i < manifests.length; i++) {
replace_string_in_file(manifests[i], '<m3:VisualElements ', '<m3:VisualElements ToastCapable="true" ');
}
...@@ -174,6 +174,15 @@ public class LocalNotification extends CordovaPlugin { ...@@ -174,6 +174,15 @@ public class LocalNotification extends CordovaPlugin {
else if (action.equals("getTriggeredIds")) { else if (action.equals("getTriggeredIds")) {
getTriggeredIds(command); getTriggeredIds(command);
} }
else if (action.equals("getSingle")) {
getSingle(args, command);
}
else if (action.equals("getSingleScheduled")) {
getSingleScheduled(args, command);
}
else if (action.equals("getSingleTriggered")) {
getSingleTriggered(args, command);
}
else if (action.equals("getAll")) { else if (action.equals("getAll")) {
getAll(args, command); getAll(args, command);
} }
...@@ -369,23 +378,51 @@ public class LocalNotification extends CordovaPlugin { ...@@ -369,23 +378,51 @@ public class LocalNotification extends CordovaPlugin {
} }
/** /**
* Set of options from local notification. * Options from local notification.
* *
* @param ids * @param ids
* Set of local notification IDs * Set of local notification IDs
* @param command * @param command
* The callback context used when calling back into JavaScript. * The callback context used when calling back into JavaScript.
*/ */
private void getAll (JSONArray ids, CallbackContext command) { private void getSingle (JSONArray ids, CallbackContext command) {
List<JSONObject> options; getOptions(ids.optString(0), Notification.Type.ALL, command);
}
if (ids.length() == 0) { /**
options = getNotificationMgr().getOptions(); * Options from scheduled notification.
} else { *
options = getNotificationMgr().getOptionsById(toList(ids)); * @param ids
* Set of local notification IDs
* @param command
* The callback context used when calling back into JavaScript.
*/
private void getSingleScheduled (JSONArray ids, CallbackContext command) {
getOptions(ids.optString(0), Notification.Type.SCHEDULED, command);
} }
command.success(new JSONArray(options)); /**
* Options from triggered notification.
*
* @param ids
* Set of local notification IDs
* @param command
* The callback context used when calling back into JavaScript.
*/
private void getSingleTriggered (JSONArray ids, CallbackContext command) {
getOptions(ids.optString(0), Notification.Type.TRIGGERED, command);
}
/**
* Set of options from local notification.
*
* @param ids
* Set of local notification IDs
* @param command
* The callback context used when calling back into JavaScript.
*/
private void getAll (JSONArray ids, CallbackContext command) {
getOptions(ids, Notification.Type.ALL, command);
} }
/** /**
...@@ -397,34 +434,61 @@ public class LocalNotification extends CordovaPlugin { ...@@ -397,34 +434,61 @@ public class LocalNotification extends CordovaPlugin {
* The callback context used when calling back into JavaScript. * The callback context used when calling back into JavaScript.
*/ */
private void getScheduled (JSONArray ids, CallbackContext command) { private void getScheduled (JSONArray ids, CallbackContext command) {
List<JSONObject> options; getOptions(ids, Notification.Type.SCHEDULED, command);
}
if (ids.length() == 0) { /**
options = getNotificationMgr().getOptionsByType(Notification.Type.SCHEDULED); * Set of options from triggered notifications.
} else { *
options = getNotificationMgr().getOptionsBy( * @param ids
Notification.Type.SCHEDULED, toList(ids)); * Set of local notification IDs
* @param command
* The callback context used when calling back into JavaScript.
*/
private void getTriggered (JSONArray ids, CallbackContext command) {
getOptions(ids, Notification.Type.TRIGGERED, command);
} }
command.success(new JSONArray(options)); /**
* Options from local notification.
*
* @param id
* Set of local notification IDs
* @param type
* The local notification life cycle type
* @param command
* The callback context used when calling back into JavaScript.
*/
private void getOptions (String id, Notification.Type type,
CallbackContext command) {
JSONArray ids = new JSONArray().put(id);
JSONObject options =
getNotificationMgr().getOptionsBy(type, toList(ids)).get(0);
command.success(options);
} }
/** /**
* Set of options from triggered notifications. * Set of options from local notifications.
* *
* @param ids * @param ids
* Set of local notification IDs * Set of local notification IDs
* @param type
* The local notification life cycle type
* @param command * @param command
* The callback context used when calling back into JavaScript. * The callback context used when calling back into JavaScript.
*/ */
private void getTriggered (JSONArray ids, CallbackContext command) { private void getOptions (JSONArray ids, Notification.Type type,
CallbackContext command) {
List<JSONObject> options; List<JSONObject> options;
if (ids.length() == 0) { if (ids.length() == 0) {
options = getNotificationMgr().getOptionsByType(Notification.Type.TRIGGERED); options = getNotificationMgr().getOptionsByType(type);
} else { } else {
options = getNotificationMgr().getOptionsBy( options = getNotificationMgr().getOptionsBy(type, toList(ids));
Notification.Type.TRIGGERED, toList(ids));
} }
command.success(new JSONArray(options)); command.success(new JSONArray(options));
......
...@@ -256,6 +256,9 @@ public class Manager { ...@@ -256,6 +256,9 @@ public class Manager {
List<Notification> notifications = getAll(); List<Notification> notifications = getAll();
ArrayList<Notification> list = new ArrayList<Notification>(); ArrayList<Notification> list = new ArrayList<Notification>();
if (type == Notification.Type.ALL)
return notifications;
for (Notification notification : notifications) { for (Notification notification : notifications) {
if (notification.getType() == type) { if (notification.getType() == type) {
list.add(notification); list.add(notification);
...@@ -368,6 +371,9 @@ public class Manager { ...@@ -368,6 +371,9 @@ public class Manager {
public List<JSONObject> getOptionsBy(Notification.Type type, public List<JSONObject> getOptionsBy(Notification.Type type,
List<Integer> ids) { List<Integer> ids) {
if (type == Notification.Type.ALL)
return getOptionsById(ids);
ArrayList<JSONObject> options = new ArrayList<JSONObject>(); ArrayList<JSONObject> options = new ArrayList<JSONObject>();
List<Notification> notifications = getByIds(ids); List<Notification> notifications = getByIds(ids);
......
...@@ -46,7 +46,7 @@ public class Notification { ...@@ -46,7 +46,7 @@ public class Notification {
// Used to differ notifications by their life cycle state // Used to differ notifications by their life cycle state
public static enum Type { public static enum Type {
SCHEDULED, TRIGGERED ALL, SCHEDULED, TRIGGERED
} }
// Default receiver to handle the trigger event // Default receiver to handle the trigger event
......
...@@ -200,7 +200,9 @@ exports.core = { ...@@ -200,7 +200,9 @@ exports.core = {
clearLocalNotification: function (id) { clearLocalNotification: function (id) {
var notification = this.getAll([id])[0]; var notification = this.getAll([id])[0];
try {
this.getToastHistory().remove('Toast' + id); this.getToastHistory().remove('Toast' + id);
} catch (e) {/*Only Phones support the NotificationHistory*/ }
if (this.isRepeating(notification)) if (this.isRepeating(notification))
return; return;
...@@ -220,7 +222,9 @@ exports.core = { ...@@ -220,7 +222,9 @@ exports.core = {
this.clearLocalNotification(ids[i]); this.clearLocalNotification(ids[i]);
} }
try {
this.getToastHistory().clear(); this.getToastHistory().clear();
} catch (e) {/*Only Phones support the NotificationHistory*/ }
this.fireEvent('clearall'); this.fireEvent('clearall');
}, },
...@@ -251,7 +255,9 @@ exports.core = { ...@@ -251,7 +255,9 @@ exports.core = {
history = this.getToastHistory(), history = this.getToastHistory(),
toasts = this.getScheduledToasts(); toasts = this.getScheduledToasts();
try {
history.remove('Toast' + id); history.remove('Toast' + id);
} catch (e) {/*Only Phones support the NotificationHistory*/ }
for (var i = 0; i < toasts.length; i++) { for (var i = 0; i < toasts.length; i++) {
var toast = toasts[i]; var toast = toasts[i];
...@@ -272,7 +278,9 @@ exports.core = { ...@@ -272,7 +278,9 @@ exports.core = {
this.cancelLocalNotification(ids[i]); this.cancelLocalNotification(ids[i]);
} }
try {
this.getToastHistory().clear(); this.getToastHistory().clear();
} catch (e) {/*Only Phones support the NotificationHistory*/ }
this.fireEvent('cancelall'); this.fireEvent('cancelall');
}, },
......
...@@ -86,20 +86,52 @@ exports.isRepeating = function (notification) { ...@@ -86,20 +86,52 @@ exports.isRepeating = function (notification) {
* @param {String} path * @param {String} path
* Relative path to sound resource * Relative path to sound resource
* *
* @return {String} URI to Sound-File * @return {String} XML Tag for Sound-File
*/ */
exports.parseSound = function (path) { exports.parseSound = function (path) {
if (!path.match(/^file/))
return '';
var uri = this.parseUri(path),
audio = "<audio src=" + uri + " loop='false'/>";
return audio;
};
/**
* Parses image file path.
*
* @param {String} path
* Relative path to image resource
*
* @return {String} XML-Tag for Image-File
*/
exports.parseImage = function (path) {
if (!path.match(/^file/))
return '';
var uri = this.parseUri(path),
image = "<image id='1' src=" + uri + " />";
return image;
};
/**
* Parses file path to URI.
*
* @param {String} path
* Relative path to a resource
*
* @return {String} URI to File
*/
exports.parseUri = function (path) {
var pkg = Windows.ApplicationModel.Package.current, var pkg = Windows.ApplicationModel.Package.current,
pkgId = pkg.id, pkgId = pkg.id,
pkgName = pkgId.name; pkgName = pkgId.name;
if (!path.match(/^file/)) var uri = "'ms-appx://" + pkgName + "/www" + path.slice(6, path.length) + "'";
return;
var sound = "'ms-appx://" + pkgName + "/www/" + path.slice(6, path.length) + "'",
audio = "<audio src=" + sound + " loop='false'/>";
return audio; return uri;
}; };
/** /**
...@@ -150,28 +182,38 @@ exports.buildToastTemplate = function (options) { ...@@ -150,28 +182,38 @@ exports.buildToastTemplate = function (options) {
sound = this.parseSound(options.sound); sound = this.parseSound(options.sound);
} }
var templateName = "ToastText",
imageNode;
if (options.icon && options.icon !== '') {
imageNode = this.parseImage(options.icon);
// template with Image
if (imageNode !== '') {
templateName = "ToastImageAndText";
};
} else {
imageNode = "";
}
var bindingNode;
if (title && title !== '') { if (title && title !== '') {
return "<toast>" + bindingNode = "<binding template='" + templateName + "02'>" +
"<visual>" + imageNode +
"<binding template='ToastText02'>" +
"<text id='1'>" + title + "</text>" + "<text id='1'>" + title + "</text>" +
"<text id='2'>" + message + "</text>" + "<text id='2'>" + message + "</text>" +
"</binding>" + "</binding>";
"</visual>" +
sound +
"<json>" + json + "</json>" +
"</toast>";
} else { } else {
bindingNode = "<binding template='" + templateName + "01'>" +
imageNode +
"<text id='1'>" + message + "</text>" +
"</binding>";
}
return "<toast>" + return "<toast>" +
"<visual>" + "<visual>" +
"<binding template='ToastText01'>" + bindingNode +
"<text id='1'>" + message + "</text>" +
"</binding>" +
"</visual>" + "</visual>" +
sound + sound +
"<json>" + json + "</json>" + "<json>" + json + "</json>" +
"</toast>"; "</toast>";
}
}; };
/** /**
......
...@@ -275,7 +275,8 @@ exports.get = function () { ...@@ -275,7 +275,8 @@ exports.get = function () {
scope = args[2]; scope = args[2];
if (!Array.isArray(ids)) { if (!Array.isArray(ids)) {
ids = [ids]; this.exec('getSingle', ids.toString(), callback, scope);
return;
} }
ids = this.convertIds(ids); ids = this.convertIds(ids);
...@@ -321,6 +322,11 @@ exports.getScheduled = function () { ...@@ -321,6 +322,11 @@ exports.getScheduled = function () {
ids = [ids]; ids = [ids];
} }
if (!Array.isArray(ids)) {
this.exec('getSingleScheduled', ids.toString(), callback, scope);
return;
}
ids = this.convertIds(ids); ids = this.convertIds(ids);
this.exec('getScheduled', ids, callback, scope); this.exec('getScheduled', ids, callback, scope);
...@@ -364,6 +370,11 @@ exports.getTriggered = function () { ...@@ -364,6 +370,11 @@ exports.getTriggered = function () {
ids = [ids]; ids = [ids];
} }
if (!Array.isArray(ids)) {
this.exec('getSingleTriggered', ids.toString(), callback, scope);
return;
}
ids = this.convertIds(ids); ids = this.convertIds(ids);
this.exec('getTriggered', ids, callback, scope); this.exec('getTriggered', ids, callback, scope);
......
...@@ -10,5 +10,11 @@ ...@@ -10,5 +10,11 @@
"type": "registry", "type": "registry",
"id": "org.apache.cordova.device" "id": "org.apache.cordova.device"
} }
},
"de.appplant.cordova.plugin.email-composer": {
"source": {
"type": "local",
"path": "../cordova-plugin-email-composer"
}
} }
} }
\ No newline at end of file
...@@ -9,15 +9,15 @@ ...@@ -9,15 +9,15 @@
"parents": { "parents": {
"/*": [ "/*": [
{ {
"xml": "<feature name=\"Device\"><param name=\"ios-package\" value=\"CDVDevice\" /></feature>", "xml": "<feature name=\"Toast\"><param name=\"ios-package\" value=\"Toast\" /></feature>",
"count": 1 "count": 1
}, },
{ {
"xml": "<feature name=\"LocalNotification\"><param name=\"ios-package\" onload=\"true\" value=\"APPLocalNotification\" /><param name=\"onload\" value=\"true\" /></feature>", "xml": "<feature name=\"Device\"><param name=\"ios-package\" value=\"CDVDevice\" /></feature>",
"count": 1 "count": 1
}, },
{ {
"xml": "<feature name=\"Toast\"><param name=\"ios-package\" value=\"Toast\" /></feature>", "xml": "<feature name=\"LocalNotification\"><param name=\"ios-package\" onload=\"true\" value=\"APPLocalNotification\" /><param name=\"onload\" value=\"true\" /></feature>",
"count": 1 "count": 1
} }
] ]
...@@ -30,16 +30,17 @@ ...@@ -30,16 +30,17 @@
"xml": false, "xml": false,
"count": 1 "count": 1
} }
] ],
"MessageUI.framework": []
} }
} }
} }
}, },
"installed_plugins": { "installed_plugins": {
"de.appplant.cordova.plugin.local-notification": { "nl.x-services.plugins.toast": {
"PACKAGE_NAME": "de.appplant.localnotification.example" "PACKAGE_NAME": "de.appplant.localnotification.example"
}, },
"nl.x-services.plugins.toast": { "de.appplant.cordova.plugin.local-notification": {
"PACKAGE_NAME": "de.appplant.localnotification.example" "PACKAGE_NAME": "de.appplant.localnotification.example"
} }
}, },
......
...@@ -7,10 +7,10 @@ ...@@ -7,10 +7,10 @@
"files": {} "files": {}
}, },
"installed_plugins": { "installed_plugins": {
"nl.x-services.plugins.toast": { "de.appplant.cordova.plugin.local-notification": {
"PACKAGE_NAME": "NotificationExample" "PACKAGE_NAME": "NotificationExample"
}, },
"de.appplant.cordova.plugin.local-notification": { "nl.x-services.plugins.toast": {
"PACKAGE_NAME": "NotificationExample" "PACKAGE_NAME": "NotificationExample"
} }
}, },
......
...@@ -308,6 +308,7 @@ ...@@ -308,6 +308,7 @@
<!-- IDs --> <!-- IDs -->
<script type="text/javascript"> <script type="text/javascript">
var callbackIds = function (ids) { var callbackIds = function (ids) {
console.log(ids);
showToast(ids.length === 0 ? '- none -' : ids.join(' ,')); showToast(ids.length === 0 ? '- none -' : ids.join(' ,'));
}; };
...@@ -331,8 +332,13 @@ ...@@ -331,8 +332,13 @@
showToast(notifications.length === 0 ? '- none -' : notifications.join(' ,')); showToast(notifications.length === 0 ? '- none -' : notifications.join(' ,'));
}; };
var callbackSingleOpts = function (notification) {
console.log(notification);
showToast(notification.toString());
};
get = function () { get = function () {
cordova.plugins.notification.local.get(1, callbackOpts); cordova.plugins.notification.local.get(1, callbackSingleOpts);
}; };
getMultiple = function () { getMultiple = function () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment