Skip to content

Commit

Permalink
Android 12 からは「展開させたくなくても展開できてしまう」ので同じものを設定しておく
Browse files Browse the repository at this point in the history
  • Loading branch information
takke committed May 19, 2022
1 parent 89277ac commit efcc7a8
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ internal class NotificationPresenter(service: Service) {
builder.setCustomContentView(notificationLayout)

// Android 12 からは「展開させたくなくても展開できてしまう」ので同じものを設定しておく
builder.setCustomBigContentView(notificationLayout)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
builder.setCustomBigContentView(notificationLayout)
}

// 端末の通知エリア(上部のアイコンが並ぶ部分)に本アプリのアイコンを表示しないようにemptyなdrawableを指定する
builder.setSmallIcon(R.drawable.transparent_image)
Expand Down

0 comments on commit efcc7a8

Please sign in to comment.