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
992478a2
Commit
992478a2
authored
Jan 14, 2015
by
PKnittel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed interpretation of args-array in android, to be the same like in iOS
parent
055d3bc3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
21 deletions
+4
-21
LocalNotification.java
src/android/LocalNotification.java
+4
-21
No files found.
src/android/LocalNotification.java
View file @
992478a2
...
@@ -40,7 +40,6 @@ import android.content.Context;
...
@@ -40,7 +40,6 @@ import android.content.Context;
import
android.content.SharedPreferences
;
import
android.content.SharedPreferences
;
import
android.content.SharedPreferences.Editor
;
import
android.content.SharedPreferences.Editor
;
import
android.os.Build
;
import
android.os.Build
;
import
android.util.Log
;
import
android.annotation.TargetApi
;
import
android.annotation.TargetApi
;
import
de.appplant.cordova.plugin.notification.*
;
import
de.appplant.cordova.plugin.notification.*
;
...
@@ -232,12 +231,8 @@ public class LocalNotification extends CordovaPlugin {
...
@@ -232,12 +231,8 @@ public class LocalNotification extends CordovaPlugin {
* @param args
* @param args
*/
*/
private
void
add
(
JSONArray
args
){
private
void
add
(
JSONArray
args
){
JSONArray
notifications
=
args
.
optJSONArray
(
0
)
;
JSONArray
notifications
=
args
;
JSONObject
arguments
;
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
++){
for
(
int
i
=
0
;
i
<
notifications
.
length
();
i
++){
arguments
=
notifications
.
optJSONObject
(
i
);
arguments
=
notifications
.
optJSONObject
(
i
);
LOG
.
d
(
"LocalNotification"
,
arguments
.
toString
());
LOG
.
d
(
"LocalNotification"
,
arguments
.
toString
());
...
@@ -255,11 +250,7 @@ public class LocalNotification extends CordovaPlugin {
...
@@ -255,11 +250,7 @@ public class LocalNotification extends CordovaPlugin {
* @param args
* @param args
*/
*/
private
void
update
(
JSONArray
args
){
private
void
update
(
JSONArray
args
){
JSONArray
updates
=
args
.
optJSONArray
(
0
);
JSONArray
updates
=
args
;
if
(
updates
==
null
){
Log
.
e
(
"LocalNotification-Update"
,
"The given arguments does not contain a JSONArray"
);
return
;
}
JSONObject
updateContent
;
JSONObject
updateContent
;
for
(
int
i
=
0
;
i
<
updates
.
length
();
i
++){
for
(
int
i
=
0
;
i
<
updates
.
length
();
i
++){
updateContent
=
args
.
optJSONObject
(
i
);
updateContent
=
args
.
optJSONObject
(
i
);
...
@@ -273,12 +264,8 @@ public class LocalNotification extends CordovaPlugin {
...
@@ -273,12 +264,8 @@ public class LocalNotification extends CordovaPlugin {
* @param args
* @param args
*/
*/
private
void
cancel
(
JSONArray
args
){
private
void
cancel
(
JSONArray
args
){
JSONArray
ids
=
args
.
optJSONArray
(
0
)
;
JSONArray
ids
=
args
;
String
id
;
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
++){
for
(
int
i
=
0
;
i
<
ids
.
length
();
i
++){
id
=
args
.
optString
(
i
);
id
=
args
.
optString
(
i
);
nWrapper
.
cancel
(
id
);
nWrapper
.
cancel
(
id
);
...
@@ -310,12 +297,8 @@ public class LocalNotification extends CordovaPlugin {
...
@@ -310,12 +297,8 @@ public class LocalNotification extends CordovaPlugin {
* @param args
* @param args
*/
*/
public
void
clear
(
JSONArray
args
){
public
void
clear
(
JSONArray
args
){
JSONArray
ids
=
args
.
optJSONArray
(
0
)
;
JSONArray
ids
=
args
;
String
id
;
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
++){
for
(
int
i
=
0
;
i
<
ids
.
length
();
i
++){
id
=
args
.
optString
(
i
);
id
=
args
.
optString
(
i
);
nWrapper
.
clear
(
id
);
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