Skip to content

Commit

Permalink
Merge pull request #328 from CleverTap/fix/SDK-2160
Browse files Browse the repository at this point in the history
fix(push-templates): add subtitle to notification header above android 12 SDK-2160
  • Loading branch information
piyush-kukadiya authored Sep 13, 2022
2 parents 26992e4 + 316e96d commit c7bbc82
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,11 @@ private void handleInputBoxNotification(Context context, Bundle extras, Intent i
repliedNotification = new NotificationCompat.Builder(context);
}
setSmallIcon(context);

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
repliedNotification.setSubText(pt_subtitle);
}

repliedNotification.setSmallIcon(smallIcon)
.setContentTitle(pt_title)
.setContentText(extras.getString(PTConstants.PT_INPUT_FEEDBACK))
Expand Down Expand Up @@ -473,7 +478,7 @@ private void handleRatingNotification(Context context, Bundle extras) {
if (notification != null) {
contentViewRating = notification.bigContentView;
contentViewSmall = notification.contentView;
}
} // why null check just return if no notification exist in drawer

if (1 == extras.getInt(PTConstants.KEY_CLICKED_STAR, 0)) {
contentViewRating.setImageViewResource(R.id.star1, R.drawable.pt_star_filled);
Expand Down

0 comments on commit c7bbc82

Please sign in to comment.