原因:
小米系统会对通知优先级做判断,只有高优先级的通知才会弹横幅通知
解决办法:
服务端在推送通知时,针对android平台做优先级设置(IOS不需要设置)
示例代码:
PushPayload pushPayload = PushPayload.newBuilder()
.setNotification(Notification.newBuilder()
.addPlatformNotification(IosNotification.alert(""))
.addPlatformNotification(AndroidNotification.newBuilder().setPriority(2).setAlert("").build())
.build())
.build();