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
215a6597
Commit
215a6597
authored
Apr 18, 2014
by
Sebastián Katzer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New Android specific `led:` flag
parent
91169ad7
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
1 deletions
+25
-1
CHANGELOG.md
CHANGELOG.md
+1
-0
README.md
README.md
+8
-0
Options.java
src/android/Options.java
+13
-0
Receiver.java
src/android/Receiver.java
+2
-1
local-notification.js
www/local-notification.js
+1
-0
No files found.
CHANGELOG.md
View file @
215a6597
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
-
[
enhancement:
]
Scope parameter for
`isScheduled`
and
`getScheduledIds`
-
[
enhancement:
]
Scope parameter for
`isScheduled`
and
`getScheduledIds`
-
[
enhancement:
]
Callbacks for
`cancel`
&
`cancelAll`
-
[
enhancement:
]
Callbacks for
`cancel`
&
`cancelAll`
-
[
enhancement:
]
`image:`
accepts remote URLs and local URIs (Android)
-
[
enhancement:
]
`image:`
accepts remote URLs and local URIs (Android)
-
[
feature:
]
New Android specific
`led:`
flag.
#### Version 0.7.4 (22.03.2014)
#### Version 0.7.4 (22.03.2014)
-
[
bugfix:
]
Platform specific properties were ignored.
-
[
bugfix:
]
Platform specific properties were ignored.
...
...
README.md
View file @
215a6597
...
@@ -74,6 +74,7 @@ More informations can be found [here][PGB_plugin].
...
@@ -74,6 +74,7 @@ More informations can be found [here][PGB_plugin].
-
[
enhancement:
]
Scope parameter for
`isScheduled`
and
`getScheduledIds`
-
[
enhancement:
]
Scope parameter for
`isScheduled`
and
`getScheduledIds`
-
[
enhancement:
]
Callbacks for
`cancel`
&
`cancelAll`
-
[
enhancement:
]
Callbacks for
`cancel`
&
`cancelAll`
-
[
enhancement:
]
`image:`
accepts remote URLs and local URIs (Android)
-
[
enhancement:
]
`image:`
accepts remote URLs and local URIs (Android)
-
[
feature:
]
New Android specific
`led:`
flag
#### Further informations
#### Further informations
-
See
[
CHANGELOG.md
][
changelog
]
to get the full changelog for the plugin.
-
See
[
CHANGELOG.md
][
changelog
]
to get the full changelog for the plugin.
...
@@ -420,6 +421,13 @@ To specify a custom interval, the `repeat` property can be assigned with an numb
...
@@ -420,6 +421,13 @@ To specify a custom interval, the `repeat` property can be assigned with an numb
window
.
plugin
.
notification
.
local
.
add
({
repeat
:
15
});
window
.
plugin
.
notification
.
local
.
add
({
repeat
:
15
});
```
```
### Change the LED color on Android devices
The LED color can be specified through the
`led`
property. By default the color value is white (FFFFFF). Its possible to change that value by setting another hex code.
```
javascript
window
.
plugin
.
notification
.
local
.
add
({
led
:
'A0FF05'
});
```
## Quirks
## Quirks
...
...
src/android/Options.java
View file @
215a6597
...
@@ -245,6 +245,19 @@ public class Options {
...
@@ -245,6 +245,19 @@ public class Options {
}
}
/**
/**
* @return
* The notification color for LED
*/
public
int
getColor
()
{
String
hexColor
=
options
.
optString
(
"led"
,
"000000"
);
int
aRGB
=
Integer
.
parseInt
(
hexColor
,
16
);
aRGB
+=
0xFF000000
;
return
aRGB
;
}
/**
* Returns numerical icon Value
* Returns numerical icon Value
*
*
* @param {String} className
* @param {String} className
...
...
src/android/Receiver.java
View file @
215a6597
...
@@ -126,7 +126,8 @@ public class Receiver extends BroadcastReceiver {
...
@@ -126,7 +126,8 @@ public class Receiver extends BroadcastReceiver {
.
setSmallIcon
(
options
.
getSmallIcon
())
.
setSmallIcon
(
options
.
getSmallIcon
())
.
setLargeIcon
(
options
.
getIcon
())
.
setLargeIcon
(
options
.
getIcon
())
.
setAutoCancel
(
options
.
getAutoCancel
())
.
setAutoCancel
(
options
.
getAutoCancel
())
.
setOngoing
(
options
.
getOngoing
());
.
setOngoing
(
options
.
getOngoing
())
.
setLights
(
options
.
getColor
(),
500
,
500
);
if
(
sound
!=
null
)
{
if
(
sound
!=
null
)
{
notification
.
setSound
(
sound
);
notification
.
setSound
(
sound
);
...
...
www/local-notification.js
View file @
215a6597
...
@@ -95,6 +95,7 @@ LocalNotification.prototype = {
...
@@ -95,6 +95,7 @@ LocalNotification.prototype = {
defaults
.
icon
=
'icon'
;
defaults
.
icon
=
'icon'
;
defaults
.
smallIcon
=
null
;
defaults
.
smallIcon
=
null
;
defaults
.
ongoing
=
false
;
defaults
.
ongoing
=
false
;
defaults
.
led
=
'FFFFFF'
;
/*RRGGBB*/
defaults
.
sound
=
'TYPE_NOTIFICATION'
;
break
;
defaults
.
sound
=
'TYPE_NOTIFICATION'
;
break
;
case
'iOS'
:
case
'iOS'
:
defaults
.
sound
=
''
;
break
;
defaults
.
sound
=
''
;
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