티스토리 뷰
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
- web chrome view
- 웹뷰
- andorid
- 안드로이드
- defaultInputmode
- javaClass
- 로그캣
- 코틀린
- create project
- StringWriter
- web view settings
- 외부 브라우저
- web view
- Android
- logtag
- kotlin
- 화면 고정
- permissions
- logcat
- simpleName
- 화면 방향 고정
- custom web view
- android studio
- screenorientation
- 영문 키보드
- create new project
- Inputmode
- new project
- check permissions
- 클래스 이름
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
글 보관함
