Skip to content

Commit

Permalink
解决高版本android通知图标不显示问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Justwen committed May 16, 2022
1 parent 6c531bb commit 30845a9
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ private NotificationCompat.Builder buildNotification(Context context) {
.setWhen(System.currentTimeMillis()) //发送时间
.setDefaults(mConfiguration.isNotificationSoundEnabled() ? Notification.DEFAULT_ALL : Notification.DEFAULT_LIGHTS) //设置默认的提示音,振动方式,灯光
.setAutoCancel(true);//打开程序后图标消失
if (DeviceUtils.isGreaterEqual_10_0()) {
builder.setSmallIcon(R.mipmap.ic_launcher_foreground);
}
return builder;
}

Expand Down

0 comments on commit 30845a9

Please sign in to comment.