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
773bf72b
Commit
773bf72b
authored
Oct 16, 2017
by
Sebastián Katzer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change attribute for message from text: to message:
parent
402e3a09
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
Options.java
src/android/notification/Options.java
+12
-12
No files found.
src/android/notification/Options.java
View file @
773bf72b
...
@@ -106,6 +106,13 @@ public final class Options {
...
@@ -106,6 +106,13 @@ public final class Options {
}
}
/**
/**
* JSON object as string.
*/
public
String
toString
()
{
return
options
.
toString
();
}
/**
* Gets the ID for the local notification.
* Gets the ID for the local notification.
*
*
* @return 0 if the user did not specify.
* @return 0 if the user did not specify.
...
@@ -558,12 +565,12 @@ public final class Options {
...
@@ -558,12 +565,12 @@ public final class Options {
* @return null if there are no messages.
* @return null if there are no messages.
*/
*/
Message
[]
getMessages
()
{
Message
[]
getMessages
()
{
Object
value
=
options
.
opt
(
"text"
);
Object
text
=
options
.
opt
(
"text"
);
if
(
value
==
null
||
value
instanceof
String
)
if
(
text
==
null
||
text
instanceof
String
)
return
null
;
return
null
;
JSONArray
list
=
(
JSONArray
)
value
;
JSONArray
list
=
(
JSONArray
)
text
;
if
(
list
.
length
()
==
0
)
if
(
list
.
length
()
==
0
)
return
null
;
return
null
;
...
@@ -573,24 +580,17 @@ public final class Options {
...
@@ -573,24 +580,17 @@ public final class Options {
for
(
int
i
=
0
;
i
<
messages
.
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
messages
.
length
;
i
++)
{
JSONObject
msg
=
list
.
optJSONObject
(
i
);
JSONObject
msg
=
list
.
optJSONObject
(
i
);
String
text
=
msg
.
optString
(
"text
"
);
String
message
=
msg
.
optString
(
"message
"
);
long
timestamp
=
msg
.
optLong
(
"date"
,
now
);
long
timestamp
=
msg
.
optLong
(
"date"
,
now
);
String
person
=
msg
.
optString
(
"person"
,
null
);
String
person
=
msg
.
optString
(
"person"
,
null
);
messages
[
i
]
=
new
Message
(
text
,
timestamp
,
person
);
messages
[
i
]
=
new
Message
(
message
,
timestamp
,
person
);
}
}
return
messages
;
return
messages
;
}
}
/**
/**
* JSON object as string.
*/
public
String
toString
()
{
return
options
.
toString
();
}
/**
* Strips the hex code #FF00FF => FF00FF
* Strips the hex code #FF00FF => FF00FF
*
*
* @param hex The hex code to strip.
* @param hex The hex code to strip.
...
...
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