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
5c903678
Commit
5c903678
authored
Feb 27, 2014
by
Sebastián Katzer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix `sound:null` on Android
parent
87f29b67
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
10 deletions
+17
-10
README.md
README.md
+3
-0
Options.java
src/android/Options.java
+1
-1
Receiver.java
src/android/Receiver.java
+13
-9
No files found.
README.md
View file @
5c903678
...
...
@@ -27,9 +27,11 @@ Through the [Command-line Interface](http://cordova.apache.org/docs/en/3.0.0/gui
```
bash
# from master:
cordova plugin add https://github.com/katzer/cordova-plugin-local-notifications.git
cordova build
# stable version:
cordova plugin add de.appplant.cordova.plugin.local-notification
cordova build
```
## Removing the Plugin from your project
...
...
@@ -55,6 +57,7 @@ More informations can be found [here](https://build.phonegap.com/plugins/413).
-
[
change:
]
The
`oncancel`
callback will be called at last if
`autoCancel`
is set to true (iOS).
-
[
bugfix:
]
Callbacks for non-repeating notifications were not called if they were not created in the current app instance on iOS.
-
[
enhancement:
]
Added 'secondly' and 'minutely' as new repeat time aliases.
-
[
bugfix:
]
`sound:null`
didnt work for Android. The default sound was played.
#### Version 0.7.2 (09.02.2014)
-
[
enhancement:
]
Avoid blocking the main thread (on Android)
**(dpogue)**
.
...
...
src/android/Options.java
View file @
5c903678
...
...
@@ -147,7 +147,7 @@ public class Options {
}
}
return
RingtoneManager
.
getDefaultUri
(
RingtoneManager
.
TYPE_NOTIFICATION
)
;
return
null
;
}
/**
...
...
src/android/Receiver.java
View file @
5c903678
...
...
@@ -117,17 +117,21 @@ public class Receiver extends BroadcastReceiver {
*/
private
Builder
buildNotification
()
{
Bitmap
icon
=
BitmapFactory
.
decodeResource
(
context
.
getResources
(),
options
.
getIcon
());
Uri
sound
=
options
.
getSound
();
Builder
notification
=
new
Notification
.
Builder
(
context
)
.
setContentTitle
(
options
.
getTitle
())
.
setContentText
(
options
.
getMessage
())
.
setNumber
(
options
.
getBadge
())
.
setTicker
(
options
.
getMessage
())
.
setSmallIcon
(
options
.
getSmallIcon
())
.
setLargeIcon
(
icon
)
.
setSound
(
options
.
getSound
())
.
setAutoCancel
(
options
.
getAutoCancel
())
.
setOngoing
(
options
.
getOngoing
());
.
setContentTitle
(
options
.
getTitle
())
.
setContentText
(
options
.
getMessage
())
.
setNumber
(
options
.
getBadge
())
.
setTicker
(
options
.
getMessage
())
.
setSmallIcon
(
options
.
getSmallIcon
())
.
setLargeIcon
(
icon
)
.
setAutoCancel
(
options
.
getAutoCancel
())
.
setOngoing
(
options
.
getOngoing
());
if
(
sound
!=
null
)
{
notification
.
setSound
(
sound
);
}
setClickEvent
(
notification
);
...
...
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