Firebase Expandable Notification Show image when app is in background

前端 未结 12 2082
深忆病人
深忆病人 2020-12-23 14:19

I am implementing FCM notifications in Android, but how does notifications differ depending on the app status (background vs. foreground)?

12条回答
  •  星月不相逢
    2020-12-23 14:58

    Send Big Picture notification from Firebase console : Works for both background and foreground app

    Instead of onMessageReceived, override zzm() of FirebaseMessagingService and create your custom notification from here

    @Override
    public void zzm(Intent intent) {
        Log.e(TAG, "zzm : " + intent);
        createBigPictureNotification();        
    }
    
    @Override
    public void onMessageReceived(RemoteMessage remoteMessage) {
    
    }
    

提交回复
热议问题