티스토리 뷰
728x90
val soundUri = Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://" + applicationContext.packageName + "/" + R.raw.d39push1)
val notificationBuilder = NotificationCompat.Builder(this, channelId)
.setSound(soundUri)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
val importance = NotificationManager.IMPORTANCE_DEFAULT
val notificationChannel = NotificationChannel(channelId, "Notice", importance)
val audioAttributes = AudioAttributes.Builder()
.setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
.setUsage(AudioAttributes.USAGE_NOTIFICATION)
.build()
notificationChannel.setSound(soundUri, audioAttributes)
notificationManager.createNotificationChannel(notificationChannel)
}
728x90
'android' 카테고리의 다른 글
안드로이드 화면 방향 고정하는 방법 (0) | 2022.07.28 |
---|---|
app icon 을 변경해 봅시다 (0) | 2022.07.21 |
wireless debugging (android 11 or less) (0) | 2022.05.28 |
constraint dimension ratio (0) | 2022.05.28 |
how to make ... at view (0) | 2022.05.24 |
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- create new project
- 영문 키보드
- kotlin
- 클래스 이름
- logtag
- 로그캣
- 안드로이드
- javaClass
- 화면 고정
- simpleName
- StringWriter
- create project
- android studio
- logcat
- 웹뷰
- screenorientation
- check permissions
- web view settings
- web view
- 화면 방향 고정
- 외부 브라우저
- permissions
- new project
- 코틀린
- custom web view
- Android
- defaultInputmode
- Inputmode
- web chrome view
- andorid
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |
글 보관함