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
a720399c
Commit
a720399c
authored
Feb 12, 2018
by
Sebastián Katzer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Log calculated trigger date in debug mode
parent
9de44b4a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
6 deletions
+24
-6
Notification.java
src/android/notification/Notification.java
+3
-0
APPNotificationOptions.m
src/ios/APPNotificationOptions.m
+21
-6
No files found.
src/android/notification/Notification.java
View file @
a720399c
...
...
@@ -33,6 +33,7 @@ import android.service.notification.StatusBarNotification;
import
android.support.v4.app.NotificationCompat
;
import
android.support.v4.util.ArraySet
;
import
android.support.v4.util.Pair
;
import
android.util.Log
;
import
android.util.SparseArray
;
import
org.json.JSONException
;
...
...
@@ -181,6 +182,8 @@ public final class Notification {
do
{
Date
date
=
request
.
getTriggerDate
();
Log
.
d
(
"local-notification"
,
"Next trigger at: "
+
date
);
if
(
date
==
null
)
continue
;
...
...
src/ios/APPNotificationOptions.m
View file @
a720399c
...
...
@@ -413,8 +413,13 @@ static NSInteger WEEKDAYS[8] = { 0, 2, 3, 4, 5, 6, 7, 1 };
seconds
=
60
;
}
return
[
UNTimeIntervalNotificationTrigger
triggerWithTimeInterval
:
seconds
repeats
:
YES
];
UNTimeIntervalNotificationTrigger
*
trigger
=
[
UNTimeIntervalNotificationTrigger
triggerWithTimeInterval
:
seconds
repeats
:
YES
];
NSLog
(
@"[local-notification] Next trigger at: %@"
,
trigger
.
nextTriggerDate
);
return
trigger
;
}
/**
...
...
@@ -430,8 +435,13 @@ static NSInteger WEEKDAYS[8] = { 0, 2, 3, 4, 5, 6, 7, 1 };
date
.
timeZone
=
[
NSTimeZone
defaultTimeZone
];
return
[
UNCalendarNotificationTrigger
triggerWithDateMatchingComponents
:
date
repeats
:
repeats
];
UNCalendarNotificationTrigger
*
trigger
=
[
UNCalendarNotificationTrigger
triggerWithDateMatchingComponents
:
date
repeats
:
repeats
];
NSLog
(
@"[local-notification] Next trigger at: %@"
,
trigger
.
nextTriggerDate
);
return
trigger
;
}
/**
...
...
@@ -447,8 +457,13 @@ static NSInteger WEEKDAYS[8] = { 0, 2, 3, 4, 5, 6, 7, 1 };
date
.
calendar
=
cal
;
date
.
timeZone
=
[
NSTimeZone
defaultTimeZone
];
return
[
UNCalendarNotificationTrigger
triggerWithDateMatchingComponents
:
date
repeats
:
YES
];
UNCalendarNotificationTrigger
*
trigger
=
[
UNCalendarNotificationTrigger
triggerWithDateMatchingComponents
:
date
repeats
:
YES
];
NSLog
(
@"[local-notification] Next trigger at: %@"
,
trigger
.
nextTriggerDate
);
return
trigger
;
}
/**
...
...
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