Commit 2f1c9281 by Sebastián Katzer

Update to plugin version 0.8.1

parent 123ccdc3
......@@ -33,7 +33,28 @@
<favorites_list name="cordova-example-local-notifications" />
</component>
<component name="FileEditorManager">
<leaf />
<leaf>
<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">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.51369864" vertical-offset="180" max-vertical-offset="7515">
<caret line="62" column="14" selection-start-line="62" selection-start-column="14" selection-end-line="62" selection-end-column="14" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="CordovaPlugin.java" pinned="false" current="false" current-in-tab="false">
<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="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" />
<folding />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FindManager">
<FindUsagesManager>
......@@ -64,8 +85,6 @@
<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/TriggerReceiver.java" />
<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/LocalNotification.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/Restore.java" />
<option value="$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/localnotification/TriggerReceiver.java" />
......@@ -74,6 +93,8 @@
<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/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/LocalNotification.java" />
</list>
</option>
</component>
......@@ -108,29 +129,45 @@
<sortByType />
</navigator>
<panes>
<pane id="ProjectPane">
<pane id="PackagesPane" />
<pane id="AndroidView">
<subPane>
<PATH>
<PATH_ELEMENT>
<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_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.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
<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>
</subPane>
</pane>
<pane id="PackagesPane" />
<pane id="AndroidView">
<subPane>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="cordova-example-local-notifications" />
......@@ -144,6 +181,14 @@
<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>
<PATH>
<PATH_ELEMENT>
......@@ -171,6 +216,26 @@
</PATH>
</subPane>
</pane>
<pane id="ProjectPane">
<subPane>
<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>
<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>
</subPane>
</pane>
<pane id="Scope" />
</panes>
</component>
......@@ -324,7 +389,7 @@
</component>
<component name="ToolWindowManager">
<frame x="0" y="23" width="1440" height="809" extended-state="6" />
<editor active="false" />
<editor active="true" />
<layout>
<window_info id="Palette&#9;" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Changes" 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" />
......@@ -335,13 +400,12 @@
<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="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="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="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="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.23319027" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.24606581" 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="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" />
......@@ -350,6 +414,7 @@
<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="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" />
</layout>
</component>
......@@ -375,17 +440,42 @@
</breakpoint-manager>
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/platforms/android/AndroidManifest.xml">
<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="195" max-vertical-offset="465">
<caret line="13" column="68" selection-start-line="13" selection-start-column="68" selection-end-line="13" selection-end-column="68" />
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="8055">
<caret line="46" column="45" selection-start-line="46" selection-start-column="39" selection-end-line="46" selection-end-column="52" />
<folding />
</state>
</provider>
</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="315" max-vertical-offset="2640">
<caret line="67" column="0" selection-start-line="67" selection-start-column="0" selection-end-line="80" selection-end-column="7" />
<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" />
<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="0" max-vertical-offset="8055">
<caret line="46" column="45" selection-start-line="46" selection-start-column="39" selection-end-line="46" selection-end-column="52" />
<folding />
</state>
</provider>
</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="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" />
<folding />
</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.0" vertical-offset="195" max-vertical-offset="465">
<caret line="13" column="68" selection-start-line="13" selection-start-column="68" selection-end-line="13" selection-end-column="68" />
</state>
</provider>
</entry>
......@@ -404,6 +494,46 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/notification/AbstractClickActivity.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-0.111872144" vertical-offset="199" max-vertical-offset="1230">
<caret line="37" column="22" selection-start-line="37" selection-start-column="22" selection-end-line="37" selection-end-column="22" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/notification/ClickActivity.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="45" max-vertical-offset="570">
<caret line="30" column="45" selection-start-line="30" selection-start-column="35" selection-end-line="30" selection-end-column="56" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/platforms/android/src/de/appplant/cordova/plugin/localnotification/ClickActivity.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.6232877" vertical-offset="102" max-vertical-offset="780">
<caret line="47" column="0" selection-start-line="47" selection-start-column="0" selection-end-line="47" selection-end-column="0" />
<folding />
</state>
</provider>
</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="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" />
<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.51369864" vertical-offset="180" max-vertical-offset="7515">
<caret line="62" column="14" selection-start-line="62" selection-start-column="14" selection-end-line="62" selection-end-column="14" />
<folding />
</state>
</provider>
</entry>
</component>
</project>
......@@ -14,7 +14,7 @@
<activity android:exported="false" android:launchMode="singleInstance" android:name="de.appplant.cordova.plugin.localnotification.ClickActivity" android:theme="@android:style/Theme.NoDisplay" />
<receiver android:exported="false" android:name="de.appplant.cordova.plugin.notification.TriggerReceiver" />
<receiver android:exported="false" android:name="de.appplant.cordova.plugin.notification.ClearReceiver" />
<receiver android:name="de.appplant.cordova.plugin.localnotification.RestoreReceiver">
<receiver android:exported="false" android:name="de.appplant.cordova.plugin.localnotification.RestoreReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
......
......@@ -31,8 +31,8 @@ module.exports.metadata =
// TOP OF METADATA
{
"nl.x-services.plugins.toast": "2.0.3",
"de.appplant.cordova.plugin.local-notification": "0.8.0rc2",
"org.apache.cordova.device": "0.3.1-dev"
"de.appplant.cordova.plugin.local-notification": "0.8.1",
"org.apache.cordova.device": "0.3.0"
}
// BOTTOM OF METADATA
});
\ No newline at end of file
......@@ -618,7 +618,7 @@ exports.applyPlatformSpecificOptions = function () {
switch (device.platform) {
case 'Android':
defaults.icon = 'res://ic_popup_reminder';
defaults.icon = 'res://icon';
defaults.smallIcon = 'res://ic_popup_reminder';
defaults.ongoing = false;
defaults.led = 'FFFFFF';
......
......@@ -10,12 +10,12 @@
</author>
<content src="index.html" />
<access origin="*" />
<feature name="Device">
<param name="android-package" value="org.apache.cordova.device.Device" />
</feature>
<feature name="Toast">
<param name="android-package" value="nl.xservices.plugins.Toast" />
</feature>
<feature name="Device">
<param name="android-package" value="org.apache.cordova.device.Device" />
</feature>
<feature name="LocalNotification">
<param name="android-package" value="de.appplant.cordova.plugin.localnotification.LocalNotification" />
</feature>
......
......@@ -43,8 +43,10 @@ public class ClickActivity extends de.appplant.cordova.plugin.notification.Click
public void onClick(Notification notification) {
LocalNotification.fireEvent("click", notification);
if (!notification.isRepeating()) {
LocalNotification.fireEvent("cancel", notification);
if (!notification.getOptions().isOngoing()) {
String event = notification.isRepeating() ? "clear" : "cancel";
LocalNotification.fireEvent(event, notification);
}
super.onClick(notification);
......
......@@ -27,6 +27,7 @@ import java.util.ArrayList;
import java.util.List;
import org.apache.cordova.CallbackContext;
import org.apache.cordova.CordovaInterface;
import org.apache.cordova.CordovaPlugin;
import org.apache.cordova.CordovaWebView;
import org.apache.cordova.PluginResult;
......@@ -60,9 +61,13 @@ public class LocalNotification extends CordovaPlugin {
/**
* Called after plugin construction and fields have been initialized.
* Prefer to use pluginInitialize instead since there is no value in
* having parameters on the initialize() function.
*
* pluginInitialize is not available for cordova 3.0-3.5 !
*/
@Override
protected void pluginInitialize() {
public void initialize (CordovaInterface cordova, CordovaWebView webView) {
LocalNotification.webView = super.webView;
}
......
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0610"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D2AAC07D0554694100DB518D"
BuildableName = "libCordova.a"
BlueprintName = "CordovaLib"
ReferencedContainer = "container:CordovaLib.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<Testables>
</Testables>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D2AAC07D0554694100DB518D"
BuildableName = "libCordova.a"
BlueprintName = "CordovaLib"
ReferencedContainer = "container:CordovaLib.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D2AAC07D0554694100DB518D"
BuildableName = "libCordova.a"
BlueprintName = "CordovaLib"
ReferencedContainer = "container:CordovaLib.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>CordovaLib.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>D2AAC07D0554694100DB518D</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>
......@@ -8,6 +8,7 @@
/* Begin PBXBuildFile section */
1D3623260D0F684500981E51 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* AppDelegate.m */; };
1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; };
27E63ABD6E5F4CE6ADF25E75 /* Toast.m in Sources */ = {isa = PBXBuildFile; fileRef = 317639DABF714DC390E5EA33 /* Toast.m */; };
288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765FC0DF74451002DB57D /* CoreGraphics.framework */; };
301BF552109A68D80062928A /* libCordova.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 301BF535109A57CC0062928A /* libCordova.a */; };
302D95F114D2391D003F00A1 /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 302D95EF14D2391D003F00A1 /* MainViewController.m */; };
......@@ -38,16 +39,14 @@
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 */; };
7E7966E71810823500FA85AD /* icon-small@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E7966DD1810823500FA85AD /* icon-small@2x.png */; };
897EA8D984444287ADC6896A /* Toast+UIView.m in Sources */ = {isa = PBXBuildFile; fileRef = EFDC6F5029BD473190452F76 /* Toast+UIView.m */; };
D4A0D8761607E02300AEF8BB /* Default-568h@2x~iphone.png in Resources */ = {isa = PBXBuildFile; fileRef = D4A0D8751607E02300AEF8BB /* Default-568h@2x~iphone.png */; };
983A6256567B4AA0A1CD0C05 /* CDVDevice.m in Sources */ = {isa = PBXBuildFile; fileRef = D7C8DFBF793D4E3FBBF548E5 /* CDVDevice.m */; };
BA1FF7AB8A0843D4B6D75634 /* AppDelegate+APPLocalNotification.m in Sources */ = {isa = PBXBuildFile; fileRef = FA506803BB60417B9E956371 /* AppDelegate+APPLocalNotification.m */; };
8D0429227DD7478AA85B6DE4 /* APPLocalNotification.m in Sources */ = {isa = PBXBuildFile; fileRef = AA0E3680EF9548D7A1647693 /* APPLocalNotification.m */; };
F6DD42A6C8B5434B8A704A6D /* APPLocalNotificationOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 041A77DE9AF240DC90859570 /* APPLocalNotificationOptions.m */; };
AF5FEB9880DE4539A4BC45FC /* UIApplication+APPLocalNotification.m in Sources */ = {isa = PBXBuildFile; fileRef = 19ADF825F662431193E42EAF /* UIApplication+APPLocalNotification.m */; };
64DB35B517F0402AACEAABBA /* UILocalNotification+APPLocalNotification.m in Sources */ = {isa = PBXBuildFile; fileRef = 2FB599EF97B14B9282F50514 /* UILocalNotification+APPLocalNotification.m */; };
0FD7FEBF220844838C311E0D /* Toast+UIView.m in Sources */ = {isa = PBXBuildFile; fileRef = 28B19DD97B8F492E9E524855 /* Toast+UIView.m */; };
16D99E33ADAE4AB1A614296F /* Toast.m in Sources */ = {isa = PBXBuildFile; fileRef = 589A02A065674CE2872A8E18 /* Toast.m */; };
6B73121FB3864C1A82DE9B50 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 087E2EB6DED441F8B126AEE8 /* QuartzCore.framework */; };
E756F105AB9E46648BA530F3 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CFD9B199EDFD43739C088EE1 /* QuartzCore.framework */; };
91D7CCD7F7DF4428B821E0C2 /* AppDelegate+APPLocalNotification.m in Sources */ = {isa = PBXBuildFile; fileRef = B30A07B20E304843BED85215 /* AppDelegate+APPLocalNotification.m */; };
21D771AF7D404183B074046C /* APPLocalNotification.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F881C97727945B78B520419 /* APPLocalNotification.m */; };
2F55D0A8E78442C39143ABA4 /* APPLocalNotificationOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6CD61B3A0A6940308E7F8D8D /* APPLocalNotificationOptions.m */; };
36CDA9ED1F1E4586906A0887 /* UIApplication+APPLocalNotification.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FD3435397CA4B1198A5C59F /* UIApplication+APPLocalNotification.m */; };
2D6640A3265E46BC95B24C55 /* UILocalNotification+APPLocalNotification.m in Sources */ = {isa = PBXBuildFile; fileRef = 19A3D761844549CD9BBE201B /* UILocalNotification+APPLocalNotification.m */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
......@@ -70,9 +69,7 @@
/* Begin PBXFileReference section */
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>"; };
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>"; };
1D6058910D05DD3D006BFB54 /* NotificationExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = NotificationExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
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>"; };
301BF52D109A57CC0062928A /* CordovaLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = CordovaLib.xcodeproj; path = CordovaLib/CordovaLib.xcodeproj; sourceTree = "<group>"; };
......@@ -95,7 +92,9 @@
30B4F2FF19D5E07200D9F7D8 /* Default-Landscape-736h.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Landscape-736h.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>"; };
317639DABF714DC390E5EA33 /* Toast.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Toast.m; path = "nl.x-services.plugins.toast/Toast.m"; sourceTree = "<group>"; };
32CA4F630368D1EE00C91783 /* NotificationExample-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NotificationExample-Prefix.pch"; sourceTree = "<group>"; };
473A33E13EFF456889DE1E64 /* CDVDevice.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVDevice.m; path = org.apache.cordova.device/CDVDevice.m; sourceTree = "<group>"; };
5B1594DC16A7569C00FEF299 /* AssetsLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AssetsLibrary.framework; path = System/Library/Frameworks/AssetsLibrary.framework; sourceTree = SDKROOT; };
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>"; };
......@@ -108,28 +107,25 @@
7E7966DC1810823500FA85AD /* icon-small.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-small.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>"; };
B522D0D21E5543AC97A4428E /* CDVDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVDevice.h; path = org.apache.cordova.device/CDVDevice.h; sourceTree = "<group>"; };
BE42DD2AC5DB40E991AB78FC /* Toast.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Toast.h; path = "nl.x-services.plugins.toast/Toast.h"; sourceTree = "<group>"; };
CFD9B199EDFD43739C088EE1 /* QuartzCore.framework */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
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>"; };
D7360D8B781449C6A33650F1 /* 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>"; };
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>"; };
F840E1F0165FE0F500CFE078 /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = config.xml; path = "NotificationExample/config.xml"; sourceTree = "<group>"; };
D7C8DFBF793D4E3FBBF548E5 /* CDVDevice.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "CDVDevice.m"; path = "org.apache.cordova.device/CDVDevice.m"; sourceTree = "<group>"; fileEncoding = 4; };
A4085081E7B14D609F4AC3F1 /* CDVDevice.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "CDVDevice.h"; path = "org.apache.cordova.device/CDVDevice.h"; sourceTree = "<group>"; fileEncoding = 4; };
FA506803BB60417B9E956371 /* AppDelegate+APPLocalNotification.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "AppDelegate+APPLocalNotification.m"; path = "de.appplant.cordova.plugin.local-notification/AppDelegate+APPLocalNotification.m"; sourceTree = "<group>"; fileEncoding = 4; };
AA0E3680EF9548D7A1647693 /* APPLocalNotification.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "APPLocalNotification.m"; path = "de.appplant.cordova.plugin.local-notification/APPLocalNotification.m"; sourceTree = "<group>"; fileEncoding = 4; };
041A77DE9AF240DC90859570 /* APPLocalNotificationOptions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "APPLocalNotificationOptions.m"; path = "de.appplant.cordova.plugin.local-notification/APPLocalNotificationOptions.m"; sourceTree = "<group>"; fileEncoding = 4; };
19ADF825F662431193E42EAF /* 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; };
2FB599EF97B14B9282F50514 /* 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; };
146CA18A92354133A726C8A3 /* AppDelegate+APPLocalNotification.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "AppDelegate+APPLocalNotification.h"; path = "de.appplant.cordova.plugin.local-notification/AppDelegate+APPLocalNotification.h"; sourceTree = "<group>"; fileEncoding = 4; };
4C5D265E18CD4A4C956AC573 /* APPLocalNotification.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "APPLocalNotification.h"; path = "de.appplant.cordova.plugin.local-notification/APPLocalNotification.h"; sourceTree = "<group>"; fileEncoding = 4; };
98A62559F4B04955941133AF /* APPLocalNotificationOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "APPLocalNotificationOptions.h"; path = "de.appplant.cordova.plugin.local-notification/APPLocalNotificationOptions.h"; sourceTree = "<group>"; fileEncoding = 4; };
57CF77C528474670B7BBC3AE /* 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; };
8C9CBC3048874CC089A781A5 /* 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; };
28B19DD97B8F492E9E524855 /* 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; };
589A02A065674CE2872A8E18 /* Toast.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "Toast.m"; path = "nl.x-services.plugins.toast/Toast.m"; sourceTree = "<group>"; fileEncoding = 4; };
C47CD115B0BA4945886CE9F8 /* 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; };
907FF5F175C249828A96B4C1 /* Toast.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "Toast.h"; path = "nl.x-services.plugins.toast/Toast.h"; sourceTree = "<group>"; fileEncoding = 4; };
087E2EB6DED441F8B126AEE8 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = "QuartzCore.framework"; path = "System/Library/Frameworks/QuartzCore.framework"; sourceTree = SDKROOT; fileEncoding = 4; };
EFDC6F5029BD473190452F76 /* 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>"; };
F840E1F0165FE0F500CFE078 /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = config.xml; path = NotificationExample/config.xml; sourceTree = "<group>"; };
B30A07B20E304843BED85215 /* AppDelegate+APPLocalNotification.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "AppDelegate+APPLocalNotification.m"; path = "de.appplant.cordova.plugin.local-notification/AppDelegate+APPLocalNotification.m"; sourceTree = "<group>"; fileEncoding = 4; };
7F881C97727945B78B520419 /* APPLocalNotification.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "APPLocalNotification.m"; path = "de.appplant.cordova.plugin.local-notification/APPLocalNotification.m"; sourceTree = "<group>"; fileEncoding = 4; };
6CD61B3A0A6940308E7F8D8D /* APPLocalNotificationOptions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "APPLocalNotificationOptions.m"; path = "de.appplant.cordova.plugin.local-notification/APPLocalNotificationOptions.m"; sourceTree = "<group>"; fileEncoding = 4; };
1FD3435397CA4B1198A5C59F /* 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; };
19A3D761844549CD9BBE201B /* 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; };
670C50D4E1C4463BA2313E56 /* AppDelegate+APPLocalNotification.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "AppDelegate+APPLocalNotification.h"; path = "de.appplant.cordova.plugin.local-notification/AppDelegate+APPLocalNotification.h"; sourceTree = "<group>"; fileEncoding = 4; };
2A4813D6B06D407F93BF7056 /* APPLocalNotification.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "APPLocalNotification.h"; path = "de.appplant.cordova.plugin.local-notification/APPLocalNotification.h"; sourceTree = "<group>"; fileEncoding = 4; };
DAB303D18FDE424AA249BC15 /* APPLocalNotificationOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "APPLocalNotificationOptions.h"; path = "de.appplant.cordova.plugin.local-notification/APPLocalNotificationOptions.h"; sourceTree = "<group>"; fileEncoding = 4; };
26102DCA1EE6456C966BAAAE /* 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; };
B1D92897A5E54BA08C518E99 /* 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; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
......@@ -141,7 +137,7 @@
301BF552109A68D80062928A /* libCordova.a in Frameworks */,
288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */,
305D5FD1115AB8F900A74A75 /* MobileCoreServices.framework in Frameworks */,
6B73121FB3864C1A82DE9B50 /* QuartzCore.framework in Frameworks */,
E756F105AB9E46648BA530F3 /* QuartzCore.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -158,7 +154,7 @@
1D3623250D0F684500981E51 /* AppDelegate.m */,
);
name = Classes;
path = "NotificationExample/Classes";
path = NotificationExample/Classes;
sourceTree = SOURCE_ROOT;
};
19C28FACFE9D520D11CA2CBB /* Products */ = {
......@@ -174,7 +170,6 @@
children = (
EB87FDF41871DAF40020F90C /* config.xml */,
EB87FDF31871DA8E0020F90C /* www */,
EB87FDF21871DA7A0020F90C /* merges */,
EB87FDF11871DA420020F90C /* Staging */,
301BF52D109A57CC0062928A /* CordovaLib.xcodeproj */,
080E96DDFE201D6D7F000001 /* Classes */,
......@@ -194,7 +189,7 @@
29B97316FDCFA39411CA2CEA /* main.m */,
);
name = "Other Sources";
path = "NotificationExample";
path = NotificationExample;
sourceTree = "<group>";
};
29B97317FDCFA39411CA2CEA /* Resources */ = {
......@@ -205,7 +200,7 @@
8D1107310486CEB800E47090 /* NotificationExample-Info.plist */,
);
name = Resources;
path = "NotificationExample/Resources";
path = NotificationExample/Resources;
sourceTree = "<group>";
};
29B97323FDCFA39411CA2CEA /* Frameworks */ = {
......@@ -214,7 +209,7 @@
5B1594DC16A7569C00FEF299 /* AssetsLibrary.framework */,
288765FC0DF74451002DB57D /* CoreGraphics.framework */,
305D5FD0115AB8F900A74A75 /* MobileCoreServices.framework */,
087E2EB6DED441F8B126AEE8 /* QuartzCore.framework */,
CFD9B199EDFD43739C088EE1 /* QuartzCore.framework */,
);
name = Frameworks;
sourceTree = "<group>";
......@@ -230,25 +225,25 @@
307C750510C5A3420062BCA9 /* Plugins */ = {
isa = PBXGroup;
children = (
D7C8DFBF793D4E3FBBF548E5 /* CDVDevice.m */,
A4085081E7B14D609F4AC3F1 /* CDVDevice.h */,
FA506803BB60417B9E956371 /* AppDelegate+APPLocalNotification.m */,
AA0E3680EF9548D7A1647693 /* APPLocalNotification.m */,
041A77DE9AF240DC90859570 /* APPLocalNotificationOptions.m */,
19ADF825F662431193E42EAF /* UIApplication+APPLocalNotification.m */,
2FB599EF97B14B9282F50514 /* UILocalNotification+APPLocalNotification.m */,
146CA18A92354133A726C8A3 /* AppDelegate+APPLocalNotification.h */,
4C5D265E18CD4A4C956AC573 /* APPLocalNotification.h */,
98A62559F4B04955941133AF /* APPLocalNotificationOptions.h */,
57CF77C528474670B7BBC3AE /* UIApplication+APPLocalNotification.h */,
8C9CBC3048874CC089A781A5 /* UILocalNotification+APPLocalNotification.h */,
28B19DD97B8F492E9E524855 /* Toast+UIView.m */,
589A02A065674CE2872A8E18 /* Toast.m */,
C47CD115B0BA4945886CE9F8 /* Toast+UIView.h */,
907FF5F175C249828A96B4C1 /* Toast.h */,
473A33E13EFF456889DE1E64 /* CDVDevice.m */,
B522D0D21E5543AC97A4428E /* CDVDevice.h */,
EFDC6F5029BD473190452F76 /* Toast+UIView.m */,
317639DABF714DC390E5EA33 /* Toast.m */,
D7360D8B781449C6A33650F1 /* Toast+UIView.h */,
BE42DD2AC5DB40E991AB78FC /* Toast.h */,
B30A07B20E304843BED85215 /* AppDelegate+APPLocalNotification.m */,
7F881C97727945B78B520419 /* APPLocalNotification.m */,
6CD61B3A0A6940308E7F8D8D /* APPLocalNotificationOptions.m */,
1FD3435397CA4B1198A5C59F /* UIApplication+APPLocalNotification.m */,
19A3D761844549CD9BBE201B /* UILocalNotification+APPLocalNotification.m */,
670C50D4E1C4463BA2313E56 /* AppDelegate+APPLocalNotification.h */,
2A4813D6B06D407F93BF7056 /* APPLocalNotification.h */,
DAB303D18FDE424AA249BC15 /* APPLocalNotificationOptions.h */,
26102DCA1EE6456C966BAAAE /* UIApplication+APPLocalNotification.h */,
B1D92897A5E54BA08C518E99 /* UILocalNotification+APPLocalNotification.h */,
);
name = Plugins;
path = "NotificationExample/Plugins";
path = NotificationExample/Plugins;
sourceTree = SOURCE_ROOT;
};
308D052D1370CCF300D202BF /* icons */ = {
......@@ -316,8 +311,8 @@
dependencies = (
301BF551109A68C00062928A /* PBXTargetDependency */,
);
name = "NotificationExample";
productName = "NotificationExample";
name = NotificationExample;
productName = NotificationExample;
productReference = 1D6058910D05DD3D006BFB54 /* NotificationExample.app */;
productType = "com.apple.product-type.application";
};
......@@ -329,7 +324,7 @@
attributes = {
LastUpgradeCheck = 510;
};
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "__CLI__" */;
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "NotificationExample" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 1;
......@@ -430,14 +425,13 @@
1D60589B0D05DD56006BFB54 /* main.m in Sources */,
1D3623260D0F684500981E51 /* AppDelegate.m in Sources */,
302D95F114D2391D003F00A1 /* MainViewController.m in Sources */,
983A6256567B4AA0A1CD0C05 /* CDVDevice.m in Sources */,
BA1FF7AB8A0843D4B6D75634 /* AppDelegate+APPLocalNotification.m in Sources */,
8D0429227DD7478AA85B6DE4 /* APPLocalNotification.m in Sources */,
F6DD42A6C8B5434B8A704A6D /* APPLocalNotificationOptions.m in Sources */,
AF5FEB9880DE4539A4BC45FC /* UIApplication+APPLocalNotification.m in Sources */,
64DB35B517F0402AACEAABBA /* UILocalNotification+APPLocalNotification.m in Sources */,
0FD7FEBF220844838C311E0D /* Toast+UIView.m in Sources */,
16D99E33ADAE4AB1A614296F /* Toast.m in Sources */,
897EA8D984444287ADC6896A /* Toast+UIView.m in Sources */,
27E63ABD6E5F4CE6ADF25E75 /* Toast.m in Sources */,
91D7CCD7F7DF4428B821E0C2 /* AppDelegate+APPLocalNotification.m in Sources */,
21D771AF7D404183B074046C /* APPLocalNotification.m in Sources */,
2F55D0A8E78442C39143ABA4 /* APPLocalNotificationOptions.m in Sources */,
36CDA9ED1F1E4586906A0887 /* UIApplication+APPLocalNotification.m in Sources */,
2D6640A3265E46BC95B24C55 /* UILocalNotification+APPLocalNotification.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -478,7 +472,7 @@
"-weak-lSystem",
"-ObjC",
);
PRODUCT_NAME = "NotificationExample";
PRODUCT_NAME = NotificationExample;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
......@@ -507,7 +501,7 @@
"-weak-lSystem",
"-ObjC",
);
PRODUCT_NAME = "NotificationExample";
PRODUCT_NAME = NotificationExample;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
......@@ -611,7 +605,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
C01FCF4E08A954540054247B /* Build configuration list for PBXProject "__CLI__" */ = {
C01FCF4E08A954540054247B /* Build configuration list for PBXProject "NotificationExample" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C01FCF4F08A954540054247B /* Debug */,
......
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:NotificationExample.xcodeproj">
</FileRef>
</Workspace>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDESourceControlProjectFavoriteDictionaryKey</key>
<false/>
<key>IDESourceControlProjectIdentifier</key>
<string>D2EC9BA3-6E07-460E-8F72-D420955A7103</string>
<key>IDESourceControlProjectName</key>
<string>NotificationExample</string>
<key>IDESourceControlProjectOriginsDictionary</key>
<dict>
<key>E6A4395732CC1C6C7441E85472223F9AAF3A67CD</key>
<string>github.com:katzer/cordova-plugin-local-notifications.git</string>
</dict>
<key>IDESourceControlProjectPath</key>
<string>platforms/ios/NotificationExample.xcodeproj</string>
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
<dict>
<key>E6A4395732CC1C6C7441E85472223F9AAF3A67CD</key>
<string>../../../..</string>
</dict>
<key>IDESourceControlProjectURL</key>
<string>github.com:katzer/cordova-plugin-local-notifications.git</string>
<key>IDESourceControlProjectVersion</key>
<integer>111</integer>
<key>IDESourceControlProjectWCCIdentifier</key>
<string>E6A4395732CC1C6C7441E85472223F9AAF3A67CD</string>
<key>IDESourceControlProjectWCConfigurations</key>
<array>
<dict>
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
<string>public.vcs.git</string>
<key>IDESourceControlWCCIdentifierKey</key>
<string>E6A4395732CC1C6C7441E85472223F9AAF3A67CD</string>
<key>IDESourceControlWCCName</key>
<string>cordova-example-local-notifications</string>
</dict>
</array>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0610"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
BuildableName = "NotificationExample.app"
BlueprintName = "NotificationExample"
ReferencedContainer = "container:NotificationExample.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
BuildableName = "NotificationExample.app"
BlueprintName = "NotificationExample"
ReferencedContainer = "container:NotificationExample.xcodeproj">
</BuildableReference>
</MacroExpansion>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<BuildableProductRunnable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
BuildableName = "NotificationExample.app"
BlueprintName = "NotificationExample"
ReferencedContainer = "container:NotificationExample.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
<BuildableProductRunnable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
BuildableName = "NotificationExample.app"
BlueprintName = "NotificationExample"
ReferencedContainer = "container:NotificationExample.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>NotificationExample.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>1D6058900D05DD3D006BFB54</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>
......@@ -501,7 +501,6 @@
&& notification.timeIntervalSinceFireDate > seconds)
{
[self.app cancelLocalNotification:notification];
[self fireEvent:@"cancel" notification:notification];
}
}
......@@ -527,8 +526,12 @@
[self fireEvent:event notification:notification];
if ([event isEqualToString:@"click"] && ![notification isRepeating])
{
if (![event isEqualToString:@"click"])
return;
if ([notification isRepeating]) {
[self fireEvent:@"clear" notification:notification];
} else {
[self.app cancelLocalNotification:notification];
[self fireEvent:@"cancel" notification:notification];
}
......
......@@ -23,6 +23,9 @@
</author>
<content src="index.html" />
<access origin="*" />
<feature name="Toast">
<param name="ios-package" value="Toast" />
</feature>
<feature name="Device">
<param name="ios-package" value="CDVDevice" />
</feature>
......@@ -30,7 +33,4 @@
<param name="ios-package" onload="true" value="APPLocalNotification" />
<param name="onload" value="true" />
</feature>
<feature name="Toast">
<param name="ios-package" value="Toast" />
</feature>
</widget>
cordova.define('cordova/plugin_list', function(require, exports, module) {
module.exports = [
{
"file": "plugins/de.appplant.cordova.plugin.local-notification/www/local-notification.js",
"id": "de.appplant.cordova.plugin.local-notification.LocalNotification",
"clobbers": [
"cordova.plugins.notification.local",
"plugin.notification.local"
]
},
{
"file": "plugins/nl.x-services.plugins.toast/www/Toast.js",
"id": "nl.x-services.plugins.toast.Toast",
"clobbers": [
......@@ -20,6 +12,14 @@ module.exports = [
"id": "nl.x-services.plugins.toast.tests"
},
{
"file": "plugins/de.appplant.cordova.plugin.local-notification/www/local-notification.js",
"id": "de.appplant.cordova.plugin.local-notification.LocalNotification",
"clobbers": [
"cordova.plugins.notification.local",
"plugin.notification.local"
]
},
{
"file": "plugins/org.apache.cordova.device/www/device.js",
"id": "org.apache.cordova.device.device",
"clobbers": [
......@@ -30,9 +30,9 @@ module.exports = [
module.exports.metadata =
// TOP OF METADATA
{
"de.appplant.cordova.plugin.local-notification": "0.8.0rc2",
"nl.x-services.plugins.toast": "2.0.3",
"org.apache.cordova.device": "0.3.1-dev"
"de.appplant.cordova.plugin.local-notification": "0.8.1",
"org.apache.cordova.device": "0.3.0"
}
// BOTTOM OF METADATA
});
\ No newline at end of file
......@@ -618,7 +618,7 @@ exports.applyPlatformSpecificOptions = function () {
switch (device.platform) {
case 'Android':
defaults.icon = 'res://ic_popup_reminder';
defaults.icon = 'res://icon';
defaults.smallIcon = 'res://ic_popup_reminder';
defaults.ongoing = false;
defaults.led = 'FFFFFF';
......
......@@ -9,11 +9,11 @@
"parents": {
"/*": [
{
"xml": "<feature name=\"Device\"><param name=\"android-package\" value=\"org.apache.cordova.device.Device\" /></feature>",
"xml": "<feature name=\"Toast\"><param name=\"android-package\" value=\"nl.xservices.plugins.Toast\" /></feature>",
"count": 1
},
{
"xml": "<feature name=\"Toast\"><param name=\"android-package\" value=\"nl.xservices.plugins.Toast\" /></feature>",
"xml": "<feature name=\"Device\"><param name=\"android-package\" value=\"org.apache.cordova.device.Device\" /></feature>",
"count": 1
},
{
......@@ -47,7 +47,7 @@
"count": 1
},
{
"xml": "<receiver android:name=\"de.appplant.cordova.plugin.localnotification.RestoreReceiver\"><intent-filter><action android:name=\"android.intent.action.BOOT_COMPLETED\" /></intent-filter></receiver>",
"xml": "<receiver android:exported=\"false\" android:name=\"de.appplant.cordova.plugin.localnotification.RestoreReceiver\"><intent-filter><action android:name=\"android.intent.action.BOOT_COMPLETED\" /></intent-filter></receiver>",
"count": 1
},
{
......
## ChangeLog
#### Version 0.8.0 (not yet released)
- [feature:] New method `hasPermission` to ask if the user has granted to display local notifications.
- [feature:] New method `registerPermission` to register permission to display local notifications.
- [feature:] New Android specific `led:` flag.
- [feature:] Add `isTriggered` & `getTriggeredIds` methods.
- [enhancement:] iOS8 support.
- [enhancement:] Android 2.x (SDK >= 7) support (Thanks to **khizarsonu**)
- [enhancement:] Scope parameter for `isScheduled` and `getScheduledIds`
- [enhancement:] Callbacks for `add`, `cancel` & `cancelAll`
- [enhancement:] `image:` accepts remote URLs and local URIs (Android)
- [enhancement:] Schedule multiple notifications at once
- [enhancement:] Cancel multiple notifications at once
- [enhancement:] Clear multiple notifications at once (Android)
- [enhancement:] `clear` & `clearAll` methods (Android)
- [enhancement:] `onclear` event (Android)
- [enhancement:] Modal dialogs when in foreground (Android)
- [enhancement:] Ability to change repeating notifications (Android)
- [enhancement:] `sound:` accepts local URIs for absolute (file:///), relative (file://) and resource path (res:). (Android)
#### Version 0.7.4 (22.03.2014)
- [bugfix:] Platform specific properties were ignored.
- [bugfix:] `cancel` may throw an error if the OS returns NIL values (iOS).
- [bugfix:] Replacing a notification with the same ID may result into canceling both (iOS).
- [bugfix:] Missing `deviceready` method (WP8).
#### Version 0.7.3 (16.03.2014)
- [bugfix:] cancel callbacks have not been fired after all notifications have been canceled on iOS.
- [change:] The `oncancel` callback will be called at last if `autoCancel` is set to true (iOS).
- [bugfix:] Callbacks for non-repeating notifications were not called if they were not created in the current app instance on iOS.
- [enhancement:] Added 'secondly' and 'minutely' as new repeat time aliases.
- [bugfix:] `sound:null` didnt work for Android. The default sound was played.
- [feature:] New interface `isScheduled` to check wether a notification with an ID is pending.
- [feature:] New interface `getScheduledIds` to retrieve a list with all currently pending notifications.
- [enhancement:] Support for bigview style notifications for Android devices.
- [bugfix:] Sound didnt play properly on iOS/Android.
- [bugfix:] click event on iOS wasn't fired if app was not running.
- [enhancement:] GET_TASK permission not needed anymore for Android.
#### Version 0.7.2 (09.02.2014)
- [enhancement:] Avoid blocking the main thread (on Android) **(dpogue)**.
- [bugfix:] `onadd` was called each time after a repeating message was triggered (Android)
- [change:] Reset badge with cancelAll.
- [bugfix:] `onclick` instead of `ontrigger` was called on "slow" iOS devices.
#### Version 0.7.1 (31.01.2014)
- [bugfix:] `ongoing` attribute was ignored.
- [bugfix:] `oncancel` wasnt fired if `autoCancel` was set to true.
- [bugfix:] App throwed an error at restart if a callback was registered.
#### Version 0.7.0 (22.01.2014)
**Note:** The new way of callback registration will be not compatible with previous versions! See #62
- **[feature:]** Added new callback registration interface and new callback types.
- [feature:] Added the ability to override notifications default properties.
- [bugfix:] Fixed build failure if iOS/MacOS/Xcode were to old (#68).
- **[change]** The message and not the title will be used as the ticker text.
#### Version 0.7.0beta1 (17.01.2014)
- [bugfix:] App throws an error on iOS if `message` is null.
- [bugfix:] Removed extra line break on iOS if `title` is null or empty.
- [bugfix:] Notification on iOS will be canceled if a new one with the same ID was added.
- [feature:] Added `autoCancel` flag.
- [bugfix:] `cancel` on iOS did not work.
- [enhancement:] Added 'hourly' as a new repeat time aliase.
- [enhancement:] Repeat with custom intervals on Android.
- **[change:]** Callbacks are called with the ID as a number and not as a string.
- [enhancement:] The background callback on Android is called, even the app is not running when the notification is tapped.
- [enhancement:] Notifications are repeated more precisely.
- [feature:] Added `json` property to pass custom data through the notification.
- [enhancement:] Added Android specific property `smallImage`.
- [enhancement:] Added Android specific property `ongoing`.
- [enhancement:] Setting launchMode to *singleInstance* isn't necessary anymore.
#### Version 0.6.3 (12.12.2013)
- [bugfix:] Black screen on Android.
- [bugfix:] App throws an error on reboot on Android.
- [enhancement:] Calling `cancel` on Android with an invalid String as ID does not throw an error anymore.
#### Version 0.6.2 (04.12.2013)
- Release under the Apache 2.0 license.
#### Version 0.6.1 (04.12.2013)
- Release under the LGPL 2.1 license.
- [feature:] Sound can be specified on Android.
- [enhancement:] Adding notifications on Android does not block the ui thread anymore.
- [bugfix:] The app did stop/crash after removing them from recent apps list.
- [enhancement:] Adding notifications on iOS does not block the ui thread anymore.
- [bugfix:] Added missing `RECEIVE_BOOT_COMPLETED`permission on Android.
- [enhancement:] Rework the code for Android. Thanks to ***samsara (samsarayg)***.
- [bugfix:] `cancel` on iOS did not work do to wrong param type.
- [enhancement:] `cancel` & `cancelAll` remove the notification(s) from notification center as well on Android.
- [bugfix:] Missing background callback on Android.
- [bugfix:] Android notification is not shown when the app is not running.
#### Version 0.6.0 (16.11.2013)
- Added WP8 support<br>
*Based on the LiveTiles WP8 plugin made by* ***Jesse MacFadyen (purplecabbage)***
- [enhancement:] The `add()` function now returns the id of the created notification.
- [feature:] Added new `title` property.
- [bugfix:] `cancel` on iOS did not work do to wrong dict key.
- [enhancement:] All notifications on Android display the app icon by default.
- [feature:] Icon can be specified on Android.
#### Version 0.4.0 (06.10.2013)
- Added Android support<br>
*Based on the LocalNotifications Android plugin made by* ***Daniël (dvtoever)***
#### Version 0.2.0 (11.08.2013)
- Added iOS support<br>
*Based on the LocalNotifications iOS plugin made by* ***Rodrigo Moyle***
\ No newline at end of file
ChangeLog
---------
Please also read the [Upgrade Guide](https://github.com/katzer/cordova-plugin-local-notifications/wiki/Upgrade-Guide) for more information.
#### Version 0.8.1 (08.03.2015)
- Fix incompatibility with cordova version 3.5-3.0
- Fire `clear` instead of `cancel` event when clicked on repeating notifications
- Do not fire `clear` or `cancel` event when clicked on persistent notifications
### Version 0.8.0 (05.03.2015)
- Support for iOS 8, Android 2 (SDK >= 7) and Android 5
- Windows Phone 8.1 will be added soon
- New interfaces to ask for / register permissions required to schedule local notifications
- `hasPermission()` and `registerPermission()`
- _schedule()_ will register the permission automatically and schedule the notification if granted.
- New interface to update already scheduled|triggered local notifications
- `update()`
- New interfaces to clear the notification center
- `clear()` and `clearAll()`
- New interfaces to query for local notifications, their properties, their IDs and their existence depend on their state
- `isPresent()`, `isScheduled()`, `isTriggered()`
- `getIds()`, `getAllIds()`, `getScheduledIds()`, `getTriggeredIds()`
- `get()`, `getAll()`, `getScheduled()`, `getTriggered()`
- Schedule multiple local notifications at once
- `schedule( [{...},{...}] )`
- Update multiple local notifications at once
- `update( [{...},{...}] )`
- Clear multiple local notifications at once
- `clear( [1, 2] )`
- Cancel multiple local notifications at once
- `cancel( [1, 2] )`
- New URI format to specify sound and image resources
- `http(s):` for remote resources _(Android)_
- `file:` for local resources relative to the _www_ folder
- `res:` for native resources
- New events
- `schedule`, `update`, `clear`, `clearall` and `cancelall`
- Enhanced event informations
- Listener will get called with the local notification object instead of only the ID
- Multiple listener for one event
- `on(event, callback, scope)`
- Unregister event listener
- `un(event, callback)`
- New Android specific properties
- `led` properties
- `sound` and `image` accepts remote resources
- Callback function and scope for all interface methods
- `schedule( notification, callback, scope )`
- Renamed `add()` to `schedule()`
- `autoCancel` property has been removed
- Use `ongoing: true` for persistent local notifications on Android
- Renamed repeat intervals
- `second`, `minute`, `hour`, `day`, `week`, `month` and `year`
- Renamed some local notification properties
- `date`, `json`, `message` and `repeat`
- Scheduling local notifications with the deprecated properties is still possible
- [Kitchen Sink sample app](https://github.com/katzer/cordova-plugin-local-notifications/tree/example)
- [Wiki](https://github.com/katzer/cordova-plugin-local-notifications/wiki)
<p align="right">
<a href="https://github.com/katzer/cordova-plugin-local-notifications/tree/example">EXAMPLE :point_right:</a>
</p>
[![PayPayl donate button](https://img.shields.io/badge/paypal-donate-yellow.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=L3HKQCD9UA35A "Donate once-off to this project using Paypal")
Cordova Local-Notification Plugin
==================================
=================================
The essential purpose of local notifications is to enable an application to inform its users that it has something for them — for example, a message or an upcoming appointment — when the application isn’t running in the foreground.<br>
They are scheduled by an application and delivered on the same device.
<img width="35%" align="right" hspace="19" vspace="12" src="https://github.com/katzer/cordova-plugin-local-notifications/blob/example/images/android.png"></img>
### How they appear to the user
Users see notifications in the following ways:
- Displaying an alert or banner
- Badging the app’s icon
- Playing a sound
### Examples of Notification Usage
Local notifications are ideally suited for applications with time-based behaviors, such as calendar and to-do list applications. Applications that run in the background for the limited period allowed by iOS might also find local notifications useful.<br>
For example, applications that depend on servers for messages or data can poll their servers for incoming items while running in the background; if a message is ready to view or an update is ready to download, they can then present a local notification immediately to inform their users.
### Plugin's Purpose
The purpose of the plugin is to create a platform-independent javascript interface for [Cordova][cordova]-based mobile applications to access the specific API on each platform.
## Supported Platforms
- **iOS** _(up to iOS8)_<br>
See [Local and Push Notification Programming Guide][ios_notification_guide] for detailed information and screenshots.
- **Android** *(SDK >=7)*<br>
See [Notification Guide][android_notification_guide] for detailed information and screenshots.
- **WP8**<br>
See [Local notifications for Windows Phone][wp8_notification_guide] for detailed information and screenshots.
<br>*Windows Phone 8.0 has no notification center. Instead local notifications are realized through live tiles updates.*
The current 0.8 branch supports the following platforms:
- __iOS__ _(including iOS8)_<br>
- __Android__ _(SDK >=7)_
The partial support for WP8.0 has been dropped, but the Windows (Phone) 8.1 platform will be fully supported soon.
## Dependencies
[Cordova][cordova] will check all dependencies and install them if they are missing.
- [org.apache.cordova.device][apache_device_plugin] *(since v0.6.0)*
Find out more informations [here][wiki_platforms] in our wiki.
## Installation
The plugin can either be installed into the local development environment or cloud based through [PhoneGap Build][PGB].
### Adding the Plugin to your project
Through the [Command-line Interface][CLI]:
```bash
# ~~ from master ~~
cordova plugin add https://github.com/katzer/cordova-plugin-local-notifications.git && cordova prepare
```
or to use the last stable version:
```bash
# ~~ stable version ~~
cordova plugin add de.appplant.cordova.plugin.local-notification && cordova prepare
```
### Removing the Plugin from your project
Through the [Command-line Interface][CLI]:
```bash
cordova plugin rm de.appplant.cordova.plugin.local-notification
```
### PhoneGap Build
Add the following xml to your config.xml to always use the latest version of this plugin:
```xml
<gap:plugin name="de.appplant.cordova.plugin.local-notification" />
```
or to use an specific version:
```xml
<gap:plugin name="de.appplant.cordova.plugin.local-notification" version="0.7.2" />
```
More information can be found [here][PGB_plugin].
## ChangeLog
#### Version 0.8.0 (not yet released)
- [feature:] New method `hasPermission` to ask if the user has granted to display local notifications.
- [feature:] New method `registerPermission` to register permission to display local notifications.
- [feature:] New Android specific `led:` flag.
- [feature:] Add `isTriggered` & `getTriggeredIds` methods.
- [enhancement:] iOS8 support.
- [enhancement:] Android 2.x (SDK >= 7) support (Thanks to **khizarsonu**)
- [enhancement:] Scope parameter for `isScheduled` and `getScheduledIds`
- [enhancement:] Callbacks for `add`, `cancel` & `cancelAll`
- [enhancement:] `image:` accepts remote URLs and local URIs (Android)
#### Further information
- See [CHANGELOG.md][changelog] to get the full changelog for the plugin.
- See the [v0.8.x TODO List][todo_list] for upcomming changes and other things.
## Using the plugin
The plugin creates the object ```window.plugin.notification.local``` with the following methods:
1. [notification.local.hasPermission][has_permission]
2. [notification.local.registerPermission][register_permission]
3. [notification.local.add][add]
4. [notification.local.cancel][cancel]
5. [notification.local.cancelAll][cancelall]
6. [notification.local.isScheduled][isscheduled]
7. [notification.local.getScheduledIds][getscheduledids]
8. [notification.local.isTriggered][istriggered]
9. [notification.local.getDefaults][getdefaults]
10. [notification.local.setDefaults][setdefaults]
11. [notification.local.onadd][onadd]
12. [notification.local.ontrigger][ontrigger]
13. [notification.local.onclick][onclick]
14. [notification.local.oncancel][oncancel]
### Plugin initialization
The plugin and its methods are not available before the *deviceready* event has been fired.
```javascript
document.addEventListener('deviceready', function () {
// window.plugin.notification.local is now available
}, false);
```
### Determine if the app does have the permission to show local notifications
If the permission has been granted through the user it can be retrieved through the `notification.local.hasPermission` interface.<br/>
The method takes a callback function as its argument which will be called with a boolean value. Optional: the scope of the callback function can be defined through a second argument.
#### Further information
- The method is supported on each platform, however it's only relevant for iOS8 and above.
```javascript
window.plugin.notification.local.hasPermission(function (granted) {
// console.log('Permission has been granted: ' + granted);
});
```
### Register permission for local notifications
Required permissions can be registered through the `notification.local.registerPermission` interface.<br/>
The method takes a callback function as its argument which will be called with a boolean value. Optional: the scope of the callback function can be defined through a second argument.
#### Further information
- The method is supported on each platform, however its only relevant for iOS8 and above.
- The user will only get a prompt dialog for the first time. Later it's only possible to change the setting via the notification center.
```javascript
window.plugin.notification.local.registerPermission(function (granted) {
// console.log('Permission has been granted: ' + granted);
});
```
### Schedule local notifications
Local notifications can be scheduled through the `notification.local.add` interface.<br>
The method takes a hash as an argument to specify the notification's properties and returns the ID for the notification.<br>
Scheduling a local notification will override an earlier one with the same ID.
All properties are optional. If no date object is given, the notification pops-up immediately.
**Note:** The notification ID must be a string which can be converted to a number (that is, `isNaN()` returns false for). If the ID has an invalid format, it will silently be changed to `0` and will override an earlier one with the same ID.
#### Further information
- See the [onadd][onadd] event for registering a listener to be notified when a local notification has been scheduled.
- See the [ontrigger][ontrigger] event for registering a listener to be notified when a local notification has been triggered.
- See the [onclick][onclick] event for registering a listener to be notified when the user has been clicked on a local notification.
- See the [platform specific properties][platform_specific_properties] too list which other properties are available too.
- See [getDefaults][getdefaults] to examine which property values are used by default and [setDefaults][setdefaults] how to override them.
- See [examples][examples] for scheduling local notifications.
```javascript
window.plugin.notification.local.add({
id: String, // A unique id of the notification
date: Date, // This expects a date object
message: String, // The message that is displayed
title: String, // The title of the message
repeat: String, // Either 'secondly', 'minutely', 'hourly', 'daily', 'weekly', 'monthly' or 'yearly'
badge: Number, // Displays number badge to notification
sound: String, // A sound to be played
json: String, // Data to be passed through the notification
autoCancel: Boolean, // Setting this flag and the notification is automatically cancelled when the user clicks it
ongoing: Boolean, // Prevent clearing of notification (Android only)
}, callback, scope);
```
### Cancel scheduled local notifications
Local notifications can be cancelled through the `notification.local.cancel` interface.<br>
Note that only local notifications with an ID can be cancelled.
#### Further information
- See the [oncancel][oncancel] event for registering a listener to be notified when a local notification has been cancelled.
- See [getScheduledIds][getscheduledids] to retrieve a list of IDs for all scheduled local notifications.
```javascript
window.plugin.notification.local.cancel(ID, function () {
// The notification has been cancelled
}, scope);
```
The plugin is installable from source and available on Cordova Plugin Registry and PhoneGap Build.
### Cancel all scheduled local notifications
All local notifications can be cancelled through the `notification.local.cancelAll` interface.<br>
The method cancels all local notifications even if they have no ID.
Find out more informations [here][wiki_installation] in our wiki.
#### Further information
- See the [oncancel][oncancel] event for registering a listener to be notified when a local notification has been cancelled.
```javascript
window.plugin.notification.local.cancelAll(function () {
// All notifications have been cancelled
}, scope);
```
### Check whether a notification with an ID is scheduled
To check if a notification with an ID is scheduled, the `notification.local.isScheduled` interface can be used.<br>
The method takes the ID of the local notification as an argument and a callback function to be called with the result. Optional: the scope of the callback can be assigned too.
## I want to get a quick overview
All wiki pages contain samples, but for a quick overview the sample section may be the fastest way.
#### Further information
- See [getScheduledIds][getscheduledids] to retrieve a list of IDs for all scheduled local notifications.
```javascript
window.plugin.notification.local.isScheduled(id, function (isScheduled) {
// console.log('Notification with ID ' + id + ' is scheduled: ' + isScheduled);
}, scope);
```
Find out more informations [here][wiki_samples] in our wiki.
### Retrieve the IDs from all currently scheduled local notifications
To retrieve the IDs from all currently scheduled local notifications, the `notification.local.getScheduledIds` interface can be used.<br>
The method takes a callback function to be called with the result as an array of IDs. Optional: the scope of the callback can be assigned too.
```javascript
window.plugin.notification.local.getScheduledIds(function (scheduledIds) {
// alert('Scheduled IDs: ' + scheduledIds.join(' ,'));
}, scope);
```
## I want to get a deep overview
The plugin supports scheduling local notifications in various ways with a single interface. It also allows you to update, clear or cancel them. There are different interfaces to query for local notifications and a complete set of events to hook into the life cycle of local notifications.
### Check whether a notification with an ID was triggered
To check if a notification with an ID was triggered, the `notification.local.isTriggered` interface can be used.<br>
The method takes the ID of the local notification as an argument and a callback function to be called with the result. Optional: the scope of the callback can be assigned too.
Find out more about how to schedule single, multiple, delayed or repeating local notifications [here][wiki_schedule].<br>
Informations about events like _click_ or _trigger_ can be found [here][wiki_events].
#### Further information
- See [getTriggeredIds][gettriggeredIds] to retrieve a list of IDs for all scheduled local notifications.
To get a deep overview we recommend to read about all the topics in our [wiki][wiki] and try out the [Kitchen Sink App][wiki_kitchensink]
```javascript
window.plugin.notification.local.isTriggered(id, function (isTriggered) {
// console.log('Notification with ID ' + id + ' is triggered: ' + isTriggered);
}, scope);
```
### Retrieve the IDs from all currently triggered local notifications
To retrieve the IDs from all currently triggered local notifications, the `notification.local.getTriggeredIds` interface can be used.<br>
The method takes a callback function to be called with the result as an array of IDs. Optional: the scope of the callback can be assigned too.
## I want to see the plugin in action
The plugin offers a kitchen sink sample app. Check out the cordova project and run the app directly from your command line or preferred IDE.
```javascript
window.plugin.notification.local.getTriggeredIds(function (triggeredIds) {
// alert('Triggered IDs: ' + triggeredIds.join(' ,'));
}, scope);
```
Find out more informations [here][wiki_kitchensink] in our wiki.
### Get the default values of the local notification properties
The default values of the local notification properties can be retrieved through the `notification.local.getDefaults` interface.<br>
The method returns an object of values for all available local notification properties on the platform.
#### Further information
- See [setDefaults][setdefaults] to override the default values.
## What's new
We are proud to announce our newest release version 0.8.x. Beside the hard work at the office and at the weekends it contains a lot of goodies, new features and easy to use APIs.
```javascript
window.plugin.notification.local.getDefaults(); // => Object
```
Find out more informations [here][wiki_changelog] in our wiki.
### Set the default values of the local notification properties
The default values of the local notification properties can be set through the `notification.local.setDefaults` interface.<br>
The method takes an object as argument.
#### Further information
- See the [add][add] interface and the [platform specific properties][platform_specific_properties] to get an overview about all available local notification properties.
- See the [example][setdefaults_example] to override default values.
## Sample
The sample demonstrates how to schedule a local notification which repeats every week. The listener will be called when the user has clicked on the local notification.
```javascript
window.plugin.notification.local.setDefaults(Object);
```
### Get notified when a local notification has been scheduled
The `notification.local.onadd` interface can be used to get notified when a local notification has been scheduled.
The listener must be a function and takes the following arguments:
- id: The ID of the notification
- state: Either *background* or *foreground*
- json: A custom (JSON encoded) string
**Note:** The event is only being invoked in background if the app is not suspended!
#### Further information
- See the [ontrigger][ontrigger] event for registering a listener to be notified when a local notification has been triggered.
```javascript
window.plugin.notification.local.onadd = function (id, state, json) {};
```
### Get notified when a local notification has been triggered
The `notification.local.ontrigger` interface can be used to get notified when a local notification has been triggered.
The listener must be a function and takes the following arguments:
- id: The ID of the notification
- state: Either *background* or *foreground*
- json: A custom (JSON encoded) string
**Note:** The event is only invoked in background if the app is running and is not suspended!
#### Further information
- See the [onclick][onclick] event for registering a listener to be notified when the user has been clicked on a local notification.
```javascript
window.plugin.notification.local.ontrigger = function (id, state, json) {};
```
### Get notified when the user has been clicked on a local notification
The `notification.local.onclick` interface can be used to get notified when the user has been clicked on a local notification.
The listener must be a function and takes the following arguments:
- id: The ID of the notification
- state: Either *background* or *foreground*
- json: A custom (JSON encoded) string
**Note:** The event is only invoked in background if the app is not suspended!
#### Further information
- The *autoCancel* property can be used to either automatically cancel the local notification or not after it has been clicked by the user.
```javascript
window.plugin.notification.local.onclick = function (id, state, json) {};
```
### Get notified when a local notification has been cancelled
The `notification.local.oncancel` interface can be used to get notified when a local notification has been cancelled.
The listener must be a function and takes the following arguments:
- id: The ID of the notification
- state: Either *background* or *foreground*
- json: A custom (JSON encoded) string
**Note:** The event is not invoked if the local notification has been cleared in the notification center.
#### Further information
- The *autoCancel* property can automatically cancel the local notification if has been clicked by the user.
- See [cancel][cancel] and [cancelAll][cancelall] to cancel local notifications manually.
```javascript
window.plugin.notification.local.oncancel = function (id, state, json) {};
```
## Examples
### Scheduling a repeating local notification in the future
The following example shows how to schedule a local notification which will be triggered every week on this day, 60 seconds from now.
```javascript
var now = new Date().getTime(),
_60_seconds_from_now = new Date(now + 60*1000);
window.plugin.notification.local.add({
cordova.plugins.notification.local.schedule({
id: 1,
title: 'Reminder',
message: 'Dont forget to buy some flowers.',
repeat: 'weekly',
date: _60_seconds_from_now
title: "Production Jour fixe",
text: "Duration 1h",
firstAt: monday_9_am,
every: "week",
sound: "file://sounds/reminder.mp3",
icon: "http://icons.com/?cal_id=1",
data: { meetingId:"123#fg8" }
});
```
### Scheduling an immediately-triggered local notification
The example below shows how to schedule a local notification which will be triggered immediately.
```javascript
window.plugin.notification.local.add({ message: 'Great app!' });
```
### Schedule a silent local notification
By default the system sound for local notifications will be used. To turn off any sound, set the *sound* property to *NULL*.
```javascript
window.plugin.notification.local.add({ sound: null });
```
### Assign user data to the notification
If needed, local notifications can be scheduled with any user data. That data can be accessed on each event listener, but cannot be modified later.
```javascript
window.plugin.notification.local.add({
id: 1,
message: 'I love BlackBerry!',
json: JSON.stringify({ test: 123 })
cordova.plugins.notification.local.on("click", function (notification) {
joinMeeting(notification.data.meetingId);
});
window.plugin.notification.local.onclick = function (id, state, json) {
console.log(id, JSON.parse(json).test);
}
```
### Change the default value of local notification properties
The following example shows how to override the default value of the *autoCancel* property.
```javascript
window.plugin.notification.local.setDefaults({ autoCancel: true });
```
Find out more informations [here][wiki_samples] in our wiki.
## Platform specifics
### Small and large icons on Android
By default all notifications will display the app icon. A specific icon can be defined through the `icon` and `smallIcon` properties.
#### Resource icons
The following example shows how to display the `<package.name>.R.drawable.ic_launcher`icon as the notification icon.
```javascript
window.plugin.notification.local.add({ icon: 'ic_launcher' });
```
## How can I support the further development?
Your support is needed. If you use the plugin please send us a drop through the donation button.
See below to use the `android.R.drawable.ic_dialog_email` icon as the notification small icon.
Thank you!
```javascript
window.plugin.notification.local.add({ smallIcon: 'ic_dialog_email' });
```
#### Local icons
The `icon` property also accepts local file URIs. The URI points to a relative path within the www folder.
```javascript
window.plugin.notification.local.add({ icon: 'file://img/logo.png' }); //=> /assets/www/img/logo.png
```
#### Remote icons
The `icon` property also accepts remote URLs. If the device cannot download the image, it will fallback to the app icon.
```javascript
window.plugin.notification.local.add({ icon: 'https://cordova.apache.org/images/cordova_bot.png' });
```
### Notification sound on Android
The sound must be an absolute or relative URI pointing to the sound file. The default sound is `RingtoneManager.TYPE_NOTIFICATION`.
**Note:** Local sound files must be placed into the res-folder and not into the assets-folder.
```javascript
/**
* Plays the `beep.mp3` which must be located in the res folder
*/
window.plugin.notification.local.add({ sound: 'android.resource://' + package_name + '/raw/beep' });
/**
* Plays a remote sound
*/
window.plugin.notification.local.add({ sound: 'http://remotedomain/beep.mp3' });
/**
* Plays a sound file which must be located in the android_assets folder
*/
window.plugin.notification.local.add({ sound: '/www/audio/beep.mp3' });
/**
* Plays the `RingtoneManager.TYPE_ALARM` sound
*/
window.plugin.notification.local.add({ sound: 'TYPE_ALARM' });
```
### Notification sound on iOS
You can package the audio data in an *aiff*, *wav*, or *caf* file. Then, in Xcode, add the sound file to your project as a nonlocalized resource of the application bundle. You may use the *afconvert* tool to convert sounds.
**Note:** To play notification sounds, permission needs to be granted in the notification center settings.<br>
**Note:** Custom sounds must be under 30 seconds when played. If a custom sound is over that limit, the default system sound is played instead.
```javascript
/**
* Plays the `beep.mp3` which must be located in the root folder of the project
*/
window.plugin.notification.local.add({ sound: 'beep.caf' });
/**
* Plays the `beep.mp3` which must located in the www folder
*/
window.plugin.notification.local.add({ sound: 'www/sounds/beep.caf' });
```
### LiveTile background images on WP8
LiveTiles have the ability to display images for different sizes. These images can be defined through the `smallImage`, `image` and `wideImage` properties.
**Note:** An image must be defined as a relative or absolute URI. They can be restored to default by cancelling the notification.
```javascript
/**
* Displays the application icon as the LiveTile's background image
*/
window.plugin.notification.local.add({ image: 'appdata:ApplicationIcon.png' })
```
### Custom repeating interval on Android
To specify a custom interval, the `repeat` property can be assigned with an number in minutes.
```javascript
/**
* Schedules the notification quarterly every 15 mins
*/
window.plugin.notification.local.add({ repeat: 15 });
```
### Change the LED color on Android devices
The LED color can be specified through the `led` property. By default the color value is white (FFFFFF). It is possible to change that value by setting another hex code.
```javascript
window.plugin.notification.local.add({ led: 'A0FF05' });
```
## Quirks
### Local Notification limit on iOS
Each application on a device is limited to 64 scheduled local notifications.<br>
The system discards scheduled notifications in excess of this limit, keeping only the 64 notifications that will fire the soonest. Recurring notifications are treated as a single notification.
### Events aren't fired on iOS
After deploying/replacing the app on the device via Xcode, no callback for previously scheduled local notifications are fired.
### No sound is played on iOS 7
Users must grant permission in the notification center settings for notification sounds to be played.
### Adding a notification on WP8
An application can only display one notification at a time. Each time a new notification is added, the application's LiveTile data will be overwritten by the new ones.
### TypeError: Cannot read property 'currentVersion' of null
Along with Cordova 3.2 and Windows Phone 8, the `version.bat` script must be renamed to `version`.
On Mac or Linux
```
mv platforms/wp8/cordova/version.bat platforms/wp8/cordova/version
```
On Windows
```
ren platforms\wp8\cordova\version.bat platforms\wp8\cordova\version
```
### Black screen (or app restarts) on Android after a notification was clicked
The launch mode for the main activity has to be set to `singleInstance`
```xml
<activity ... android:launchMode="singleInstance" ... />
```
[![PayPayl donate button](https://img.shields.io/badge/paypal-donate-yellow.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=L3HKQCD9UA35A "Donate once-off to this project using Paypal")
## Contributing
......@@ -549,35 +108,16 @@ The launch mode for the main activity has to be set to `singleInstance`
This software is released under the [Apache 2.0 License][apache2_license].
© 2013-2014 appPlant UG, Inc. All rights reserved
© 2013-2015 appPlant UG, Inc. All rights reserved
[cordova]: https://cordova.apache.org
[ios_notification_guide]: http://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/WhatAreRemoteNotif.html
[android_notification_guide]: http://developer.android.com/guide/topics/ui/notifiers/notifications.html
[wp8_notification_guide]: http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj207047.aspx
[apache_device_plugin]: https://github.com/apache/cordova-plugin-device
[CLI]: http://cordova.apache.org/docs/en/3.0.0/guide_cli_index.md.html#The%20Command-line%20Interface
[PGB]: http://docs.build.phonegap.com/en_US/3.3.0/index.html
[PGB_plugin]: https://build.phonegap.com/plugins/413
[changelog]: CHANGELOG.md
[todo_list]: ../../issues/164
[onadd]: #get-notified-when-a-local-notification-has-been-scheduled
[onclick]: #get-notified-when-the-user-has-been-clicked-on-a-local-notification
[oncancel]: #get-notified-when-a-local-notification-has-been-canceled
[ontrigger]: #get-notified-when-a-local-notification-has-been-triggered
[platform-specific-properties]: #platform-specifics
[has_permission]: #determine-if-the-app-does-have-the-permission-to-show-local-notifications
[register_permission]: #register-permission-for-local-notifications
[add]: #schedule-local-notifications
[cancel]: #cancel-scheduled-local-notifications
[cancelall]: #cancel-all-scheduled-local-notifications
[getdefaults]: #get-the-default-values-of-the-local-notification-properties
[setdefaults]: #set-the-default-values-of-the-local-notification-properties
[getscheduledids]: #retrieve-the-ids-from-all-currently-scheduled-local-notifications
[gettriggeredids]: #retrieve-the-ids-from-all-currently-triggered-local-notifications
[isscheduled]: #check-wether-a-notification-with-an-id-is-scheduled
[istriggered]: #check-wether-a-notification-with-an-id-was-triggered
[examples]: #examples
[setdefaults-example]: #change-the-default-value-of-local-notification-properties
[wiki]: https://github.com/katzer/cordova-plugin-local-notifications/wiki
[wiki_platforms]: https://github.com/katzer/cordova-plugin-local-notifications/wiki/02.-Platforms
[wiki_installation]: https://github.com/katzer/cordova-plugin-local-notifications/wiki/03.-Installation
[wiki_kitchensink]: https://github.com/katzer/cordova-plugin-local-notifications/tree/example
[wiki_schedule]: https://github.com/katzer/cordova-plugin-local-notifications/wiki/04.-Scheduling
[wiki_events]: https://github.com/katzer/cordova-plugin-local-notifications/wiki/09.-Events
[wiki_samples]: https://github.com/katzer/cordova-plugin-local-notifications/wiki/11.-Samples
[wiki_changelog]: https://github.com/katzer/cordova-plugin-local-notifications/wiki/Upgrade-Guide
[apache2_license]: http://opensource.org/licenses/Apache-2.0
......@@ -3,11 +3,11 @@
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="de.appplant.cordova.plugin.local-notification"
version="0.8.0rc2">
version="0.8.1">
<name>LocalNotification</name>
<description>The purpose of the plugin is to create an platform independent javascript interface for Cordova based mobile applications to access the specific Notification API on each platform.</description>
<description>The plugin supports scheduling local notifications in various ways with a single interface. It also allows you to update, clear or cancel them. There are different interfaces to query for local notifications and a complete set of events to hook into the life cycle of local notifications. To get a deep overview we recommend to read about all the topics in our wiki and try out the Kitchen Sink App</description>
<repo>https://github.com/katzer/cordova-plugin-local-notifications.git</repo>
......@@ -25,6 +25,14 @@
<!-- dependencies -->
<dependency id="org.apache.cordova.device" />
<!-- info -->
<info>
Your support is needed. If you use the plugin please support us in order to ensure further development.
https://github.com/katzer/cordova-plugin-local-notifications/tree/example#how-can-i-support-the-further-development
Thank you!
</info>
<!-- js -->
<js-module src="www/local-notification.js" name="LocalNotification">
<clobbers target="cordova.plugins.notification.local" />
......@@ -91,7 +99,7 @@
android:name="de.appplant.cordova.plugin.notification.ClearReceiver"
android:exported="false" />
<receiver android:name="de.appplant.cordova.plugin.localnotification.RestoreReceiver" >
<receiver android:name="de.appplant.cordova.plugin.localnotification.RestoreReceiver" android:exported="false" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
......
......@@ -43,8 +43,10 @@ public class ClickActivity extends de.appplant.cordova.plugin.notification.Click
public void onClick(Notification notification) {
LocalNotification.fireEvent("click", notification);
if (!notification.isRepeating()) {
LocalNotification.fireEvent("cancel", notification);
if (!notification.getOptions().isOngoing()) {
String event = notification.isRepeating() ? "clear" : "cancel";
LocalNotification.fireEvent(event, notification);
}
super.onClick(notification);
......
......@@ -27,6 +27,7 @@ import java.util.ArrayList;
import java.util.List;
import org.apache.cordova.CallbackContext;
import org.apache.cordova.CordovaInterface;
import org.apache.cordova.CordovaPlugin;
import org.apache.cordova.CordovaWebView;
import org.apache.cordova.PluginResult;
......@@ -60,9 +61,13 @@ public class LocalNotification extends CordovaPlugin {
/**
* Called after plugin construction and fields have been initialized.
* Prefer to use pluginInitialize instead since there is no value in
* having parameters on the initialize() function.
*
* pluginInitialize is not available for cordova 3.0-3.5 !
*/
@Override
protected void pluginInitialize() {
public void initialize (CordovaInterface cordova, CordovaWebView webView) {
LocalNotification.webView = super.webView;
}
......
......@@ -501,7 +501,6 @@
&& notification.timeIntervalSinceFireDate > seconds)
{
[self.app cancelLocalNotification:notification];
[self fireEvent:@"cancel" notification:notification];
}
}
......@@ -527,8 +526,12 @@
[self fireEvent:event notification:notification];
if ([event isEqualToString:@"click"] && ![notification isRepeating])
{
if (![event isEqualToString:@"click"])
return;
if ([notification isRepeating]) {
[self fireEvent:@"clear" notification:notification];
} else {
[self.app cancelLocalNotification:notification];
[self fireEvent:@"cancel" notification:notification];
}
......
......@@ -618,7 +618,7 @@ exports.applyPlatformSpecificOptions = function () {
switch (device.platform) {
case 'Android':
defaults.icon = 'res://ic_popup_reminder';
defaults.icon = 'res://icon';
defaults.smallIcon = 'res://ic_popup_reminder';
defaults.ongoing = false;
defaults.led = 'FFFFFF';
......
......@@ -4,5 +4,11 @@
"type": "local",
"path": "/Users/sebastian/Documents/github/cordova-plugin-local-notifications"
}
},
"org.apache.cordova.device": {
"source": {
"type": "registry",
"id": "org.apache.cordova.device"
}
}
}
\ No newline at end of file
......@@ -9,15 +9,15 @@
"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
},
{
"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
},
{
"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
}
]
......@@ -36,10 +36,10 @@
}
},
"installed_plugins": {
"de.appplant.cordova.plugin.local-notification": {
"nl.x-services.plugins.toast": {
"PACKAGE_NAME": "de.appplant.cordova.plugin.local-notification.example"
},
"nl.x-services.plugins.toast": {
"de.appplant.cordova.plugin.local-notification": {
"PACKAGE_NAME": "de.appplant.cordova.plugin.local-notification.example"
}
},
......
{"source":{"type":"git","url":"https://github.com/apache/cordova-plugin-device","subdir":"."}}
\ No newline at end of file
......@@ -22,7 +22,7 @@
xmlns:rim="http://www.blackberry.com/ns/widgets"
xmlns:android="http://schemas.android.com/apk/res/android"
id="org.apache.cordova.device"
version="0.3.1-dev">
version="0.3.0">
<name>Device</name>
<description>Cordova Device Plugin</description>
<license>Apache 2.0</license>
......
......@@ -22,7 +22,7 @@
xmlns:rim="http://www.blackberry.com/ns/widgets"
xmlns:android="http://schemas.android.com/apk/res/android"
id="org.apache.cordova.device.tests"
version="0.3.1-dev">
version="0.2.14">
<name>Cordova Device Plugin Tests</name>
<license>Apache 2.0</license>
......
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