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
ec674ea7
Commit
ec674ea7
authored
Apr 12, 2016
by
Alexandre Laurent
Committed by
Sebastián Katzer
Apr 12, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Android: Ability to disable notification led (#864)
parent
d9ac383b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
+8
-4
Builder.java
src/android/notification/Builder.java
+6
-2
Options.java
src/android/notification/Options.java
+1
-1
local-notification-util.js
www/local-notification-util.js
+1
-1
No files found.
src/android/notification/Builder.java
View file @
ec674ea7
...
...
@@ -117,6 +117,7 @@ public class Builder {
public
Notification
build
()
{
Uri
sound
=
options
.
getSoundUri
();
int
smallIcon
=
options
.
getSmallIcon
();
int
ledColor
=
options
.
getLedColor
();
NotificationCompat
.
Builder
builder
;
builder
=
new
NotificationCompat
.
Builder
(
context
)
...
...
@@ -127,8 +128,11 @@ public class Builder {
.
setTicker
(
options
.
getText
())
.
setAutoCancel
(
options
.
isAutoClear
())
.
setOngoing
(
options
.
isOngoing
())
.
setColor
(
options
.
getColor
())
.
setLights
(
options
.
getLedColor
(),
100
,
100
);
.
setColor
(
options
.
getColor
());
if
(
ledColor
!=
0
)
{
builder
.
setLights
(
ledColor
,
100
,
100
);
}
if
(
sound
!=
null
)
{
builder
.
setSound
(
sound
);
...
...
src/android/notification/Options.java
View file @
ec674ea7
...
...
@@ -242,7 +242,7 @@ public class Options {
String
hex
=
options
.
optString
(
"led"
,
null
);
if
(
hex
==
null
)
{
return
NotificationCompat
.
DEFAULT_LIGHTS
;
return
0
;
}
int
aRGB
=
Integer
.
parseInt
(
hex
,
16
);
...
...
www/local-notification-util.js
View file @
ec674ea7
...
...
@@ -67,7 +67,7 @@ exports.applyPlatformSpecificOptions = function () {
defaults
.
smallIcon
=
undefined
;
defaults
.
ongoing
=
false
;
defaults
.
autoClear
=
true
;
defaults
.
led
=
'FF0000'
;
defaults
.
led
=
undefined
;
defaults
.
color
=
undefined
;
break
;
}
...
...
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