Hi, Tried to override the push notification status. As I am working on cross platform application I felt difficulty to override the native functionality. What I am looking for is based on device OS. I need to show different types of notification.
We know that kitkat able to show inboxstyle with summary text but in ics its not posssible. In my app, I am able to show notification in kitkat but in ICS only content title is getting displayed, not message.
if(Build.VERSION.SDK_INT <= 4.4){
// Entering into loop if the device is below kitkat version
if (message != null) {
mBuilder.setContentTitle(message);
mBuilder.setContentText(message);
//mBuilder.setStyle(new NotificationCompat.BigTextStyle().bigText(message));
} else {
mBuilder.setContentText("<missing message content>");
}
}else{
if (message != null) {
inboxStyle.setSummaryText(message);
inboxStyle.setBigContentTitle(Html.fromHtml("<font weight='bold' color='Red' size='larger'>Alerts</font>"));
inboxStyle.addLine(Html.fromHtml("<span style=\"background: red;\"><font weight='bold' color='white' size='large'>"+message+"</font></span>"));
} else {
inboxStyle.setBigContentTitle(Html.fromHtml("<font weight='bold' color='Red' size='larger'>Alerts</font>"));
inboxStyle.addLine(Html.fromHtml("<p><font weight='bold' color='white' size='small'>missing message content</font></p>"));
}
mBuilder.setStyle(inboxStyle);
}
Can u share some inbox style format? Even span background color is also not applying.