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
d06b1ad7
Commit
d06b1ad7
authored
Jan 17, 2014
by
Tim Warberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added ongoing option (android only)
parent
0cc81a21
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
4 deletions
+10
-4
README.md
README.md
+1
-0
Options.java
src/android/Options.java
+5
-1
Receiver.java
src/android/Receiver.java
+3
-3
local-notification.js
www/local-notification.js
+1
-0
No files found.
README.md
View file @
d06b1ad7
...
...
@@ -117,6 +117,7 @@ window.plugin.notification.local.add({
sound
:
String
,
// A sound to be played
json
:
String
,
// Data to be passed through the notification
autoCancel
:
Boolean
,
// Setting this flag and the notification is automatically canceled when the user clicks it
ongoing
:
Boolean
,
// Prevent clearing of notification (Android only)
foreground
:
String
,
// A javascript function to be called if the app is running
background
:
String
,
// A javascript function to be called if the app is in the background
});
...
...
src/android/Options.java
View file @
d06b1ad7
...
...
@@ -182,7 +182,7 @@ public class Options {
if
(
resId
==
0
)
{
resId
=
getIcon
();
}
return
options
.
optInt
(
"smallIcon"
,
resId
);
}
...
...
@@ -228,6 +228,10 @@ public class Options {
return
options
.
optBoolean
(
"autoCancel"
,
false
);
}
public
Boolean
getOngoing
()
{
return
options
.
optBoolean
(
"ongoing"
,
false
);
}
/**
* Gibt die zusätzlichen Daten als String an.
*/
...
...
src/android/Receiver.java
View file @
d06b1ad7
...
...
@@ -130,7 +130,8 @@ public class Receiver extends BroadcastReceiver {
.
setSmallIcon
(
options
.
getSmallIcon
())
.
setLargeIcon
(
icon
)
.
setSound
(
options
.
getSound
())
.
setAutoCancel
(
options
.
getAutoCancel
());
.
setAutoCancel
(
options
.
getAutoCancel
())
.
setOngoing
(
options
.
getOngoing
());
setClickEvent
(
notification
);
...
...
@@ -196,4 +197,4 @@ public class Receiver extends BroadcastReceiver {
LocalNotification
.
webView
.
sendJavascript
(
js
);
}
}
}
\ No newline at end of file
}
www/local-notification.js
View file @
d06b1ad7
...
...
@@ -36,6 +36,7 @@ LocalNotification.prototype = {
message
:
''
,
title
:
''
,
autoCancel
:
false
,
ongoing
:
false
,
badge
:
0
,
id
:
'0'
,
json
:
''
,
...
...
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