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
adbdaf0f
Commit
adbdaf0f
authored
Jan 11, 2014
by
Sebastián Katzer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert PR #48
If the trigger date was in the past, the notification will be displayed immediately.
parent
f0d7949e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
11 deletions
+3
-11
Restore.java
src/android/Restore.java
+3
-11
No files found.
src/android/Restore.java
View file @
adbdaf0f
...
@@ -22,7 +22,6 @@
...
@@ -22,7 +22,6 @@
package
de
.
appplant
.
cordova
.
plugin
.
localnotification
;
package
de
.
appplant
.
cordova
.
plugin
.
localnotification
;
import
java.util.Set
;
import
java.util.Set
;
import
java.util.Date
;
import
org.json.JSONArray
;
import
org.json.JSONArray
;
import
org.json.JSONException
;
import
org.json.JSONException
;
...
@@ -55,18 +54,11 @@ public class Restore extends BroadcastReceiver {
...
@@ -55,18 +54,11 @@ public class Restore extends BroadcastReceiver {
for
(
String
alarmId
:
alarmIds
)
{
for
(
String
alarmId
:
alarmIds
)
{
try
{
try
{
JSONArray
args
=
new
JSONArray
(
alarms
.
getString
(
alarmId
,
""
));
JSONArray
args
=
new
JSONArray
(
alarms
.
getString
(
alarmId
,
""
));
/* If this notification was registered for a time when the
* device was off then change the date to now to ensure that no
* notifications are missed
*/
Date
now
=
new
Date
();
if
(
now
.
after
(
new
Date
(
args
.
optLong
(
"date"
)
*
1000
)))
{
args
.
put
(
"date"
,
(
now
.
getTime
()
/
1000
));
}
Options
options
=
new
Options
(
context
).
parse
(
args
.
getJSONObject
(
0
));
Options
options
=
new
Options
(
context
).
parse
(
args
.
getJSONObject
(
0
));
/*
* If the trigger date was in the past, the notification will be displayed immediately.
*/
LocalNotification
.
add
(
options
);
LocalNotification
.
add
(
options
);
}
catch
(
JSONException
e
)
{}
}
catch
(
JSONException
e
)
{}
...
...
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