applicationInForeground
全部标签 只有当应用程序不在前台时,我才需要向用户显示通知。这是我的公共(public)类MyFirebaseMessagingService扩展FirebaseMessagingService{@OverridepublicvoidonMessageReceived(RemoteMessageremoteMessage){if(applicationInForeground()){Mapdata=remoteMessage.getData();sendNotification(data.get("title"),data.get("detail"));}}需要实现applicationInFo
只有当应用程序不在前台时,我才需要向用户显示通知。这是我的公共(public)类MyFirebaseMessagingService扩展FirebaseMessagingService{@OverridepublicvoidonMessageReceived(RemoteMessageremoteMessage){if(applicationInForeground()){Mapdata=remoteMessage.getData();sendNotification(data.get("title"),data.get("detail"));}}需要实现applicationInFo