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
00fe2003
Commit
00fe2003
authored
Oct 03, 2014
by
Sebastián Katzer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Back-port PR's from master
parent
c02c926a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
4 deletions
+21
-4
CHANGELOG.md
CHANGELOG.md
+6
-0
README.md
README.md
+6
-0
Receiver.java
src/android/Receiver.java
+3
-2
APPLocalNotification.m
src/ios/APPLocalNotification.m
+6
-2
No files found.
CHANGELOG.md
View file @
00fe2003
## ChangeLog
#### Version 0.7.6 (03.10.2014)
-
[
bugfix:
]
`hasPermission`
and
`promptForPermission`
let the app crash on iOS7 and older.
-
[
bugfix:
]
Convert the id value to a String before comparison.
-
[
bugfix:
]
Prevent possible crash when calling
`cancelAll`
.
-
[
enhancement:
]
Do not inherit any notification defaults.
#### Version 0.7.5 (29.09.2014)
-
[
enhancement:
]
__iOS8 Support__
-
[
feature:
]
New method
`hasPermission`
to ask if the user has granted to display local notifications.
...
...
README.md
View file @
00fe2003
...
...
@@ -70,6 +70,12 @@ More informations can be found [here][PGB_plugin].
## ChangeLog
#### Version 0.7.6 (03.10.2014)
-
[
bugfix:
]
`hasPermission`
and
`promptForPermission`
let the app crash on iOS7 and older.
-
[
bugfix:
]
Convert the id value to a String before comparison.
-
[
bugfix:
]
Prevent possible crash when calling
`cancelAll`
.
-
[
enhancement:
]
Do not inherit any notification defaults.
#### Version 0.7.5 (29.09.2014)
-
[
enhancement:
]
__iOS8 Support__
-
[
feature:
]
New method
`hasPermission`
to ask if the user has granted to display local notifications.
...
...
src/android/Receiver.java
View file @
00fe2003
...
...
@@ -122,6 +122,7 @@ public class Receiver extends BroadcastReceiver {
Uri
sound
=
options
.
getSound
();
Builder
notification
=
new
Notification
.
Builder
(
context
)
.
setDefaults
(
0
)
// Do not inherit any defaults
.
setContentTitle
(
options
.
getTitle
())
.
setContentText
(
options
.
getMessage
())
.
setNumber
(
options
.
getBadge
())
...
...
@@ -130,7 +131,7 @@ public class Receiver extends BroadcastReceiver {
.
setLargeIcon
(
icon
)
.
setAutoCancel
(
options
.
getAutoCancel
())
.
setOngoing
(
options
.
getOngoing
());
if
(
sound
!=
null
)
{
notification
.
setSound
(
sound
);
}
...
...
@@ -139,7 +140,7 @@ public class Receiver extends BroadcastReceiver {
notification
.
setStyle
(
new
Notification
.
BigTextStyle
()
.
bigText
(
options
.
getMessage
()));
}
setClickEvent
(
notification
);
return
notification
;
...
...
src/ios/APPLocalNotification.m
View file @
00fe2003
...
...
@@ -102,11 +102,14 @@
NSArray
*
arguments
=
[
command
arguments
];
NSMutableDictionary
*
properties
=
[
arguments
objectAtIndex
:
0
];
UILocalNotification
*
notification
;
NSString
*
id
=
[
properties
objectForKey
:
@"id"
];
if
([
self
isNotificationScheduledWithId
:
id
])
{
UILocalNotification
*
notification
=
[
self
notificationWithId
:
id
];
notification
=
[
self
notificationWithId
:
id
];
}
if
(
notification
)
{
dispatch_after
(
dispatch_time
(
DISPATCH_TIME_NOW
,
0
.
3
*
NSEC_PER_SEC
),
dispatch_get_main_queue
(),
^
{
[
self
cancelNotification
:
notification
fireEvent
:
NO
];
...
...
@@ -576,7 +579,8 @@
for
(
UILocalNotification
*
notification
in
notifications
)
{
NSString
*
notId
=
[
notification
.
userInfo
objectForKey
:
@"id"
];
NSString
*
notId
=
[[
notification
.
userInfo
objectForKey
:
@"id"
]
stringValue
];
if
([
notId
isEqualToString
:
id
])
{
return
notification
;
...
...
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