Android firebase Notification, BigPicture with BigContentTitle
Jun 16 ’21
Comments: 1
Answers: 0
0
public void showNotification(String title, String message,String post_id
Bitmap bitmap){
Intent intent = new Intent(this, DescriptionActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
intent.putExtra("text",""+title);
NotificationCompat.Builder builder = new NotificationCompat.Builder(this,"MyNotification1")
.setContentTitle(message)
.setSmallIcon(R.drawable.icon)
.setColor(Color.rgb(136,196,85))
.setContentIntent(PendingIntent.getActivity(this,0,intent,PendingIntent.FLAG_UPDATE_CURRENT))
.setAutoCancel(true)
.setStyle(new NotificationCompat.BigPictureStyle().bigPicture(bitmap))
.setStyle(new NotificationCompat.BigPictureStyle().setBigContentTitle(message));
NotificationManagerCompat managerCompat = NotificationManagerCompat.from(this);
managerCompat.notify(999, builder.build());
}
above is my code what i want is to display bigContentTitle with…
原文链接:Android firebase Notification, BigPicture with BigContentTitle
© 版权声明
THE END
暂无评论内容