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
7489876d
Commit
7489876d
authored
Sep 01, 2016
by
PC Dreams (Paulo Cristo)
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/katzer/cordova-plugin-local-notifications
parents
6759116c
366557fd
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
7 deletions
+15
-7
plugin.xml
plugin.xml
+2
-1
Builder.java
src/android/notification/Builder.java
+6
-2
Options.java
src/android/notification/Options.java
+2
-2
APPLocalNotificationOptions.h
src/ios/APPLocalNotificationOptions.h
+3
-0
local-notification-util.js
www/local-notification-util.js
+1
-1
local-notification.js
www/local-notification.js
+1
-1
No files found.
plugin.xml
View file @
7489876d
...
@@ -20,7 +20,8 @@
...
@@ -20,7 +20,8 @@
<!-- cordova -->
<!-- cordova -->
<engines>
<engines>
<engine
name=
"cordova"
version=
">=3.6.0"
/>
<engine
name=
"cordova"
version=
">=3.6.0"
/>
<engine
name=
"cordova-plugman"
version=
">=4.3.0"
/>
<!-- TODO next version: Probably I meant cordova-lib -->
<!-- <engine name="cordova-plugman" version=">=4.3.0" /> -->
<engine
name=
"cordova-windows"
version=
">=4.2.0"
/>
<engine
name=
"cordova-windows"
version=
">=4.2.0"
/>
</engines>
</engines>
...
...
src/android/notification/Builder.java
View file @
7489876d
...
@@ -117,6 +117,7 @@ public class Builder {
...
@@ -117,6 +117,7 @@ public class Builder {
public
Notification
build
()
{
public
Notification
build
()
{
Uri
sound
=
options
.
getSoundUri
();
Uri
sound
=
options
.
getSoundUri
();
int
smallIcon
=
options
.
getSmallIcon
();
int
smallIcon
=
options
.
getSmallIcon
();
int
ledColor
=
options
.
getLedColor
();
NotificationCompat
.
Builder
builder
;
NotificationCompat
.
Builder
builder
;
builder
=
new
NotificationCompat
.
Builder
(
context
)
builder
=
new
NotificationCompat
.
Builder
(
context
)
...
@@ -127,8 +128,11 @@ public class Builder {
...
@@ -127,8 +128,11 @@ public class Builder {
.
setTicker
(
options
.
getText
())
.
setTicker
(
options
.
getText
())
.
setAutoCancel
(
options
.
isAutoClear
())
.
setAutoCancel
(
options
.
isAutoClear
())
.
setOngoing
(
options
.
isOngoing
())
.
setOngoing
(
options
.
isOngoing
())
.
setColor
(
options
.
getColor
())
.
setColor
(
options
.
getColor
());
.
setLights
(
options
.
getLedColor
(),
100
,
100
);
if
(
ledColor
!=
0
)
{
builder
.
setLights
(
ledColor
,
100
,
100
);
}
if
(
sound
!=
null
)
{
if
(
sound
!=
null
)
{
builder
.
setSound
(
sound
);
builder
.
setSound
(
sound
);
...
...
src/android/notification/Options.java
View file @
7489876d
...
@@ -132,7 +132,7 @@ public class Options {
...
@@ -132,7 +132,7 @@ public class Options {
if
(
options
.
has
(
"iconUri"
)
&&
!
options
.
optBoolean
(
"updated"
))
if
(
options
.
has
(
"iconUri"
)
&&
!
options
.
optBoolean
(
"updated"
))
return
;
return
;
Uri
iconUri
=
assets
.
parse
(
options
.
optString
(
"icon"
,
"icon"
));
Uri
iconUri
=
assets
.
parse
(
options
.
optString
(
"icon"
,
"
res://
icon"
));
Uri
soundUri
=
assets
.
parseSound
(
options
.
optString
(
"sound"
,
null
));
Uri
soundUri
=
assets
.
parseSound
(
options
.
optString
(
"sound"
,
null
));
try
{
try
{
...
@@ -242,7 +242,7 @@ public class Options {
...
@@ -242,7 +242,7 @@ public class Options {
String
hex
=
options
.
optString
(
"led"
,
null
);
String
hex
=
options
.
optString
(
"led"
,
null
);
if
(
hex
==
null
)
{
if
(
hex
==
null
)
{
return
NotificationCompat
.
DEFAULT_LIGHTS
;
return
0
;
}
}
int
aRGB
=
Integer
.
parseInt
(
hex
,
16
);
int
aRGB
=
Integer
.
parseInt
(
hex
,
16
);
...
...
src/ios/APPLocalNotificationOptions.h
View file @
7489876d
...
@@ -21,6 +21,9 @@
...
@@ -21,6 +21,9 @@
* @APPPLANT_LICENSE_HEADER_END@
* @APPPLANT_LICENSE_HEADER_END@
*/
*/
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@interface
APPLocalNotificationOptions
:
NSObject
@interface
APPLocalNotificationOptions
:
NSObject
-
(
id
)
initWithDict
:(
NSDictionary
*
)
dict
;
-
(
id
)
initWithDict
:(
NSDictionary
*
)
dict
;
...
...
www/local-notification-util.js
View file @
7489876d
...
@@ -67,7 +67,7 @@ exports.applyPlatformSpecificOptions = function () {
...
@@ -67,7 +67,7 @@ exports.applyPlatformSpecificOptions = function () {
defaults
.
smallIcon
=
undefined
;
defaults
.
smallIcon
=
undefined
;
defaults
.
ongoing
=
false
;
defaults
.
ongoing
=
false
;
defaults
.
autoClear
=
true
;
defaults
.
autoClear
=
true
;
defaults
.
led
=
'FF0000'
;
defaults
.
led
=
undefined
;
defaults
.
color
=
undefined
;
defaults
.
color
=
undefined
;
break
;
break
;
}
}
...
...
www/local-notification.js
View file @
7489876d
...
@@ -372,5 +372,5 @@ exports.on = function (event, callback, scope) {
...
@@ -372,5 +372,5 @@ exports.on = function (event, callback, scope) {
* The function to be exec as callback
* The function to be exec as callback
*/
*/
exports
.
un
=
function
(
event
,
callback
)
{
exports
.
un
=
function
(
event
,
callback
)
{
this
.
core
.
un
(
event
,
callback
,
scope
);
this
.
core
.
un
(
event
,
callback
);
};
};
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