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
e3842e41
Commit
e3842e41
authored
Nov 26, 2013
by
Sebastián Katzer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
App does not crash/stop anymore after removing them from recent list.
parent
94a80117
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
5 deletions
+22
-5
LocalNotificationOptions.java
src/android/LocalNotificationOptions.java
+22
-5
No files found.
src/android/LocalNotificationOptions.java
View file @
e3842e41
...
...
@@ -12,10 +12,10 @@ package de.appplant.cordova.plugin.localnotification;
import
java.util.Calendar
;
import
java.util.Date
;
import
org.apache.cordova.CordovaInterface
;
import
org.json.JSONObject
;
import
android.app.AlarmManager
;
import
android.content.Context
;
import
android.media.RingtoneManager
;
import
android.net.Uri
;
...
...
@@ -29,6 +29,7 @@ public class LocalNotificationOptions {
*/
private
JSONObject
options
=
new
JSONObject
();
private
String
id
=
null
;
private
String
packageName
=
null
;
private
long
interval
=
0
;
private
long
date
=
0
;
...
...
@@ -36,6 +37,24 @@ public class LocalNotificationOptions {
* Parse options passed from javascript part of this plugin.
*/
LocalNotificationOptions
(
JSONObject
options
)
{
packageName
=
LocalNotification
.
cordova
.
getActivity
().
getPackageName
();
parse
(
options
);
}
/**
* Parse options passed from javascript part of this plugin.
*/
LocalNotificationOptions
(
JSONObject
options
,
Context
context
)
{
packageName
=
context
.
getPackageName
();
parse
(
options
);
}
/**
* Parst die übergebenen Eigenschaften.
*/
private
void
parse
(
JSONObject
options
)
{
String
repeat
=
options
.
optString
(
"repeat"
);
this
.
options
=
options
;
...
...
@@ -115,10 +134,8 @@ public class LocalNotificationOptions {
* Gibt den Pfad zum Icon der Notification an.
*/
public
int
getIcon
()
{
int
icon
=
0
;
CordovaInterface
cordova
=
LocalNotification
.
cordova
;
String
packageName
=
cordova
.
getActivity
().
getPackageName
();
String
iconName
=
options
.
optString
(
"icon"
,
"icon"
);
int
icon
=
0
;
String
iconName
=
options
.
optString
(
"icon"
,
"icon"
);
icon
=
getIconValue
(
packageName
,
iconName
);
...
...
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