Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cordova-plugin-local-notifications
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nabil Sadki
cordova-plugin-local-notifications
Commits
14dfd156
Commit
14dfd156
authored
Apr 14, 2014
by
Sebastián Katzer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small code changes
parent
cbf00120
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
13 deletions
+6
-13
LocalNotification.java
src/android/LocalNotification.java
+6
-13
No files found.
src/android/LocalNotification.java
View file @
14dfd156
...
@@ -87,7 +87,7 @@ public class LocalNotification extends CordovaPlugin {
...
@@ -87,7 +87,7 @@ public class LocalNotification extends CordovaPlugin {
cancel
(
id
);
cancel
(
id
);
unpersist
(
id
);
unpersist
(
id
);
execCallback
(
command
);
command
.
success
(
);
}
}
});
});
}
}
...
@@ -97,7 +97,7 @@ public class LocalNotification extends CordovaPlugin {
...
@@ -97,7 +97,7 @@ public class LocalNotification extends CordovaPlugin {
public
void
run
()
{
public
void
run
()
{
cancelAll
();
cancelAll
();
unpersistAll
();
unpersistAll
();
execCallback
(
command
);
command
.
success
(
);
}
}
});
});
}
}
...
@@ -227,13 +227,13 @@ public class LocalNotification extends CordovaPlugin {
...
@@ -227,13 +227,13 @@ public class LocalNotification extends CordovaPlugin {
* The notification ID to be check.
* The notification ID to be check.
* @param callbackContext
* @param callbackContext
*/
*/
public
static
void
isScheduled
(
String
id
,
CallbackContext
c
allbackContext
)
{
public
static
void
isScheduled
(
String
id
,
CallbackContext
c
ommand
)
{
SharedPreferences
settings
=
getSharedPreferences
();
SharedPreferences
settings
=
getSharedPreferences
();
Map
<
String
,
?>
alarms
=
settings
.
getAll
();
Map
<
String
,
?>
alarms
=
settings
.
getAll
();
boolean
isScheduled
=
alarms
.
containsKey
(
id
);
boolean
isScheduled
=
alarms
.
containsKey
(
id
);
PluginResult
result
=
new
PluginResult
(
PluginResult
.
Status
.
OK
,
isScheduled
);
PluginResult
result
=
new
PluginResult
(
PluginResult
.
Status
.
OK
,
isScheduled
);
c
allbackContext
.
sendPluginResult
(
result
);
c
ommand
.
sendPluginResult
(
result
);
}
}
/**
/**
...
@@ -241,13 +241,13 @@ public class LocalNotification extends CordovaPlugin {
...
@@ -241,13 +241,13 @@ public class LocalNotification extends CordovaPlugin {
*
*
* @param callbackContext
* @param callbackContext
*/
*/
public
static
void
getScheduledIds
(
CallbackContext
c
allbackContext
)
{
public
static
void
getScheduledIds
(
CallbackContext
c
ommand
)
{
SharedPreferences
settings
=
getSharedPreferences
();
SharedPreferences
settings
=
getSharedPreferences
();
Map
<
String
,
?>
alarms
=
settings
.
getAll
();
Map
<
String
,
?>
alarms
=
settings
.
getAll
();
Set
<
String
>
alarmIds
=
alarms
.
keySet
();
Set
<
String
>
alarmIds
=
alarms
.
keySet
();
JSONArray
pendingIds
=
new
JSONArray
(
alarmIds
);
JSONArray
pendingIds
=
new
JSONArray
(
alarmIds
);
c
allbackContext
.
success
(
pendingIds
);
c
ommand
.
success
(
pendingIds
);
}
}
/**
/**
...
@@ -295,13 +295,6 @@ public class LocalNotification extends CordovaPlugin {
...
@@ -295,13 +295,6 @@ public class LocalNotification extends CordovaPlugin {
}
}
/**
/**
* Simply invokes the callback without any parameter.
*/
private
static
void
execCallback
(
CallbackContext
command
)
{
command
.
sendPluginResult
(
new
PluginResult
(
PluginResult
.
Status
.
OK
));
}
/**
* Fires the given event.
* Fires the given event.
*
*
* @param {String} event The Name of the event
* @param {String} event The Name of the event
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment