DEV Community

loading...

Android firebase Notification, BigPicture with BigContentTitle

Mohd Bilal
Always Learner
・1 min read
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…

Discussion (0)