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
6af684b3
Commit
6af684b3
authored
Apr 13, 2014
by
Sebastián Katzer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minimize android-support-v4.jar to only include required classes
parent
b9ba9ab7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
16 deletions
+15
-16
android-support-v4.jar
libs/android/android-support-v4.jar
+0
-0
Receiver.java
src/android/Receiver.java
+15
-16
No files found.
libs/android/android-support-v4.jar
View file @
6af684b3
No preview for this file type
src/android/Receiver.java
View file @
6af684b3
...
@@ -28,8 +28,7 @@ import org.json.JSONException;
...
@@ -28,8 +28,7 @@ import org.json.JSONException;
import
org.json.JSONObject
;
import
org.json.JSONObject
;
import
android.annotation.SuppressLint
;
import
android.annotation.SuppressLint
;
import
android.app.Notification
;
import
android.support.v4.app.NotificationCompat
;
import
android.support.v4.app.*
;
import
android.support.v4.app.NotificationCompat.*
;
import
android.support.v4.app.NotificationCompat.*
;
import
android.app.NotificationManager
;
import
android.app.NotificationManager
;
import
android.app.PendingIntent
;
import
android.app.PendingIntent
;
...
@@ -118,29 +117,29 @@ public class Receiver extends BroadcastReceiver {
...
@@ -118,29 +117,29 @@ public class Receiver extends BroadcastReceiver {
* Creates the notification.
* Creates the notification.
*/
*/
@SuppressLint
(
"NewApi"
)
@SuppressLint
(
"NewApi"
)
private
Builder
buildNotification
()
{
private
Builder
buildNotification
()
{
Bitmap
icon
=
BitmapFactory
.
decodeResource
(
context
.
getResources
(),
options
.
getIcon
());
Bitmap
icon
=
BitmapFactory
.
decodeResource
(
context
.
getResources
(),
options
.
getIcon
());
Uri
sound
=
options
.
getSound
();
Uri
sound
=
options
.
getSound
();
Builder
notification
=
new
NotificationCompat
.
Builder
(
context
)
Builder
notification
=
new
NotificationCompat
.
Builder
(
context
)
.
setContentTitle
(
options
.
getTitle
())
.
setContentTitle
(
options
.
getTitle
())
.
setContentText
(
options
.
getMessage
())
.
setContentText
(
options
.
getMessage
())
.
setNumber
(
options
.
getBadge
())
.
setNumber
(
options
.
getBadge
())
.
setTicker
(
options
.
getMessage
())
.
setTicker
(
options
.
getMessage
())
.
setSmallIcon
(
options
.
getSmallIcon
())
.
setSmallIcon
(
options
.
getSmallIcon
())
.
setLargeIcon
(
icon
)
.
setLargeIcon
(
icon
)
.
setAutoCancel
(
options
.
getAutoCancel
())
.
setAutoCancel
(
options
.
getAutoCancel
())
.
setOngoing
(
options
.
getOngoing
());
.
setOngoing
(
options
.
getOngoing
());
if
(
sound
!=
null
)
{
if
(
sound
!=
null
)
{
notification
.
setSound
(
sound
);
notification
.
setSound
(
sound
);
}
}
if
(
Build
.
VERSION
.
SDK_INT
>
16
)
{
if
(
Build
.
VERSION
.
SDK_INT
>
16
)
{
notification
.
setStyle
(
new
NotificationCompat
.
BigTextStyle
()
notification
.
setStyle
(
new
NotificationCompat
.
BigTextStyle
()
.
bigText
(
options
.
getMessage
()));
.
bigText
(
options
.
getMessage
()));
}
}
setClickEvent
(
notification
);
setClickEvent
(
notification
);
return
notification
;
return
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