0 votes
I had some problem with the firebase notification that does not go through the function while the app is in background while debug. It show different notification style which was not the design i wanted.

I had tried to trace the notification function triggered but i had no clue on it. What i know was when i changed the app icon in android manifi the notification icon will changed also. Please help me.

I want to combine the notification together to make it tidy. Below is my firebase notification code.

public class MyFirebaseMessagingService extends FirebaseMessagingService{

    public void onMessageReceived(RemoteMessage remoteMessage){
        Notification.InboxStyle inboxStyle = new Notification.InboxStyle();
        Intent intent = new Intent(this, MainActivity.class);
        PendingIntent pendingIntent = PendingIntent.getActivity(this,0,intent,PendingIntent.FLAG_UPDATE_CURRENT);
        NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this);
        if(remoteMessage.getNotification().getTitle() == null){
            // doing something
        }else if(remoteMessage.getNotification().getTitle().equals("Notification1")){
            // doing something
        }else if(remoteMessage.getNotification().getTitle().equals("Notification2")){
             // doing something
            inboxStyle.setBigContentTitle("Enter Content Text");
            inboxStyle.addLine("hi events "+value);
            NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);


asked Dec 7, 2017 in ANDROID by Amrendra | 11 views

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.

Related Questions

Welcome to Knowledge Boostr, where you can ask questions and receive answers from other members of the community.
This is a collaboratively edited question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top Q&A for professional and enthusiast programmers Q&A for professional and enthusiast programmers Q&A for professional and enthusiast programmers Q&A for professional and enthusiast programmers

23,494 questions
40,169 answers
23,703 users