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
055d3bc3
Commit
055d3bc3
authored
Jan 14, 2015
by
PKnittel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed Application-Crash in case of wrong formated arguments on android.
parent
3ed70988
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
LocalNotification.java
src/android/LocalNotification.java
+17
-0
No files found.
src/android/LocalNotification.java
View file @
055d3bc3
...
...
@@ -40,6 +40,7 @@ import android.content.Context;
import
android.content.SharedPreferences
;
import
android.content.SharedPreferences.Editor
;
import
android.os.Build
;
import
android.util.Log
;
import
android.annotation.TargetApi
;
import
de.appplant.cordova.plugin.notification.*
;
...
...
@@ -233,6 +234,10 @@ public class LocalNotification extends CordovaPlugin {
private
void
add
(
JSONArray
args
){
JSONArray
notifications
=
args
.
optJSONArray
(
0
);
JSONObject
arguments
;
if
(
notifications
==
null
){
Log
.
e
(
"LocalNotification-Add"
,
"The given arguments does not contain a JSONArray"
);
return
;
}
for
(
int
i
=
0
;
i
<
notifications
.
length
();
i
++){
arguments
=
notifications
.
optJSONObject
(
i
);
LOG
.
d
(
"LocalNotification"
,
arguments
.
toString
());
...
...
@@ -251,6 +256,10 @@ public class LocalNotification extends CordovaPlugin {
*/
private
void
update
(
JSONArray
args
){
JSONArray
updates
=
args
.
optJSONArray
(
0
);
if
(
updates
==
null
){
Log
.
e
(
"LocalNotification-Update"
,
"The given arguments does not contain a JSONArray"
);
return
;
}
JSONObject
updateContent
;
for
(
int
i
=
0
;
i
<
updates
.
length
();
i
++){
updateContent
=
args
.
optJSONObject
(
i
);
...
...
@@ -266,6 +275,10 @@ public class LocalNotification extends CordovaPlugin {
private
void
cancel
(
JSONArray
args
){
JSONArray
ids
=
args
.
optJSONArray
(
0
);
String
id
;
if
(
ids
==
null
){
Log
.
e
(
"LocalNotification-Cancel"
,
"The given arguments does not contain a JSONArray"
);
return
;
}
for
(
int
i
=
0
;
i
<
ids
.
length
();
i
++){
id
=
args
.
optString
(
i
);
nWrapper
.
cancel
(
id
);
...
...
@@ -299,6 +312,10 @@ public class LocalNotification extends CordovaPlugin {
public
void
clear
(
JSONArray
args
){
JSONArray
ids
=
args
.
optJSONArray
(
0
);
String
id
;
if
(
ids
==
null
){
Log
.
e
(
"LocalNotification-Clear"
,
"The given arguments does not contain a JSONArray"
);
return
;
}
for
(
int
i
=
0
;
i
<
ids
.
length
();
i
++){
id
=
args
.
optString
(
i
);
nWrapper
.
clear
(
id
);
...
...
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