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
67e8c736
Commit
67e8c736
authored
Mar 15, 2014
by
Sebastián Katzer
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:katzer/cordova-plugin-local-notifications
parents
6e2d2df4
42b5f263
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
29 deletions
+29
-29
LocalNotification.java
src/android/LocalNotification.java
+1
-1
Options.java
src/android/Options.java
+17
-17
Receiver.java
src/android/Receiver.java
+3
-3
local-notification.js
www/local-notification.js
+8
-8
No files found.
src/android/LocalNotification.java
View file @
67e8c736
...
...
@@ -328,7 +328,7 @@ public class LocalNotification extends CordovaPlugin {
}
/**
*
Gibt an, ob die App im Hintergrund läuft.
*
Specifies whether the App is running in the background
*/
private
static
boolean
isInBackground
()
{
try
{
...
...
src/android/Options.java
View file @
67e8c736
...
...
@@ -51,7 +51,7 @@ public class Options {
}
/**
* Pars
t die übergebenen Eigenschaften.
* Pars
es the given properties
*/
public
Options
parse
(
JSONObject
options
)
{
String
repeat
=
options
.
optString
(
"repeat"
);
...
...
@@ -82,7 +82,7 @@ public class Options {
}
/**
* Set
zt die neue Zeit an Hand des Intervalls.
* Set
new time according to interval
*/
public
Options
moveDate
()
{
try
{
...
...
@@ -93,21 +93,21 @@ public class Options {
}
/**
*
Gibt die Eigenschaften als JSONObjekt an.
*
Returns options as JSON object
*/
public
JSONObject
getJSONObject
()
{
return
options
;
}
/**
*
Gibt die Zeit in Millisekunden an, wann die Notification aufpoppen soll.
*
Returns time in milliseconds when notification is scheduled to fire
*/
public
long
getDate
()
{
return
options
.
optLong
(
"date"
,
0
)
*
1000
;
}
/**
*
Gibt die Zeit als Kalender an.
*
Returns time as calender
*/
public
Calendar
getCalendar
()
{
Calendar
calendar
=
Calendar
.
getInstance
();
...
...
@@ -118,21 +118,21 @@ public class Options {
}
/**
*
Gibt die Nachricht der Notification an.
*
Returns the notification's message
*/
public
String
getMessage
()
{
return
options
.
optString
(
"message"
,
""
);
}
/**
*
Gibt den Titel der Notification an.
*
Returns the notification's title
*/
public
String
getTitle
()
{
return
options
.
optString
(
"title"
,
""
);
}
/**
*
Gibt den Pfad zum Sound der Notification an.
*
Returns the path of the notification's sound file
*/
public
Uri
getSound
()
{
String
sound
=
options
.
optString
(
"sound"
,
null
);
...
...
@@ -151,7 +151,7 @@ public class Options {
}
/**
*
Gibt den ID Code des Bildes an.
*
Returns the icon's ID
*/
public
int
getIcon
()
{
int
icon
=
0
;
...
...
@@ -171,7 +171,7 @@ public class Options {
}
/**
*
Gibt den ID Code des kleinen Bildes an.
*
Returns the small icon's ID
*/
public
int
getSmallIcon
()
{
int
resId
=
0
;
...
...
@@ -191,49 +191,49 @@ public class Options {
}
/**
*
Gibt das Intervall an, in dem die Notification aufpoppen sol
l (daily, weekly, monthly, yearly)
*
Returns notification repetition interva
l (daily, weekly, monthly, yearly)
*/
public
long
getInterval
()
{
return
interval
;
}
/**
*
Gibt die Badge-Nummer der Notification an.
*
Returns notification badge number
*/
public
int
getBadge
()
{
return
options
.
optInt
(
"badge"
,
0
);
}
/**
*
Gibt die Callback-ID des PluginResults an.
*
Returns PluginResults' callback ID
*/
public
String
getId
()
{
return
options
.
optString
(
"id"
,
"0"
);
}
/**
*
Gibt an, ob die Notification automatisch geschlossen werden soll, wenn der Benutzer darauf klickt
.
*
Returns whether notification is cancelled automatically when clicked
.
*/
public
Boolean
getAutoCancel
()
{
return
options
.
optBoolean
(
"autoCancel"
,
false
);
}
/**
*
*
Returns whether the notification is ongoing (uncancellable). Android only.
*/
public
Boolean
getOngoing
()
{
return
options
.
optBoolean
(
"ongoing"
,
false
);
}
/**
*
Gibt die zusätzlichen Daten als String an.
*
Returns additional data as string
*/
public
String
getJSON
()
{
return
options
.
optString
(
"json"
,
""
);
}
/**
*
Gibt den Zahlwert des Icons an.
*
Returns numerical icon Value
*
* @param {String} className
* @param {String} iconName
...
...
src/android/Receiver.java
View file @
67e8c736
...
...
@@ -114,7 +114,7 @@ public class Receiver extends BroadcastReceiver {
}
/**
*
Erstellt die N
otification.
*
Creates the n
otification.
*/
@SuppressLint
(
"NewApi"
)
private
Builder
buildNotification
()
{
...
...
@@ -146,7 +146,7 @@ public class Receiver extends BroadcastReceiver {
}
/**
*
Fügt der Notification einen onclick Handler hinzu.
*
Adds an onclick handler to the notification
*/
private
Builder
setClickEvent
(
Builder
notification
)
{
Intent
intent
=
new
Intent
(
context
,
ReceiverActivity
.
class
)
...
...
@@ -161,7 +161,7 @@ public class Receiver extends BroadcastReceiver {
}
/**
*
Zeigt die Notification an.
*
Shows the notification
*/
@SuppressWarnings
(
"deprecation"
)
@SuppressLint
(
"NewApi"
)
...
...
www/local-notification.js
View file @
67e8c736
...
...
@@ -33,7 +33,7 @@ var LocalNotification = function () {
LocalNotification
.
prototype
=
{
/**
*
Gibt alle Standardeinstellungen an.
*
Returns the default settings
*
* @return {Object}
*/
...
...
@@ -42,7 +42,7 @@ LocalNotification.prototype = {
},
/**
*
Überschreibt die Standardeinstellungen.
*
Overwrite default settings
*
* @param {Object} defaults
*/
...
...
@@ -58,7 +58,7 @@ LocalNotification.prototype = {
/**
* @private
* Merge
d die Eigenschaften mit den Standardwerten.
* Merge
settings with default values
*
* @param {Object} options
* @retrun {Object}
...
...
@@ -97,10 +97,10 @@ LocalNotification.prototype = {
},
/**
*
Fügt einen neuen Eintrag zur Registry hinzu.
*
Add a new entry to the registry
*
* @param {Object} options
* @return {Number}
Die ID der Notification
* @return {Number}
The notification's ID
*/
add
:
function
(
options
)
{
var
options
=
this
.
mergeWithDefaults
(
options
),
...
...
@@ -130,16 +130,16 @@ LocalNotification.prototype = {
},
/**
*
Entfernt die angegebene Notification.
*
Cancels the specified notification
*
* @param {String} id
* @param {String} id
of the notification
*/
cancel
:
function
(
id
)
{
cordova
.
exec
(
null
,
null
,
'LocalNotification'
,
'cancel'
,
[
id
.
toString
()]);
},
/**
*
Entfernt alle registrierten Notifications.
*
Removes all previously registered notifications
*/
cancelAll
:
function
()
{
cordova
.
exec
(
null
,
null
,
'LocalNotification'
,
'cancelAll'
,
[]);
...
...
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