Skip to content

Commit 90ad3a7

Browse files
Merge pull request #63 from nikolayczyk/master
BigTextStyle for Android
2 parents ef55633 + 4333144 commit 90ad3a7

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

local-notifications-common.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ LocalNotifications.defaults = {
77
badge: 0,
88
interval: 0,
99
ongoing: false,
10-
groupSummary:null
10+
groupSummary:null,
11+
bigTextStyle: false
1112
};
1213

1314
LocalNotifications.merge = function merge(obj1, obj2) { // Our merge function

local-notifications.android.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,14 @@ LocalNotifications.schedule = function (arg) {
112112
var pendingContentIntent = android.app.PendingIntent.getActivity(context, reqCode, clickIntent, android.app.PendingIntent.FLAG_UPDATE_CURRENT);
113113
builder.setContentIntent(pendingContentIntent);
114114

115+
// set big text style
116+
if(options.bigTextStyle){
117+
var bigTextStyle = new android.support.v4.app.NotificationCompat.BigTextStyle();
118+
bigTextStyle.setBigContentTitle(options.title);
119+
bigTextStyle.bigText(options.body);
120+
builder.setStyle(bigTextStyle);
121+
}
122+
115123
// add the intent which schedules the notification
116124
var notificationIntent = new android.content.Intent(context, com.telerik.localnotifications.NotificationPublisher.class)
117125
.setAction("" + options.id)

local-notifications.d.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,14 @@ declare namespace localNotifications {
9191
* Android only.
9292
*/
9393
groupSummary?:string;
94+
95+
/**
96+
* Using the big text style
97+
*
98+
* Android only.
99+
* Default false.
100+
*/
101+
bigTextStyle?: boolean;
94102
}
95103

96104
export interface ReceivedNotification {

0 commit comments

Comments
 (0)