Skip to content

Commit b2d50f9

Browse files
authored
fix(android): use notification sound for notifications, not alarm (#2743)
1 parent 25505d2 commit b2d50f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

android/capacitor/src/main/java/com/getcapacitor/plugin/notification/NotificationChannelManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public void createChannel(JSObject channel) {
8282
}
8383
AudioAttributes audioAttributes = new AudioAttributes.Builder()
8484
.setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
85-
.setUsage(AudioAttributes.USAGE_ALARM).build();
85+
.setUsage(AudioAttributes.USAGE_NOTIFICATION).build();
8686
Uri soundUri = Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://" + context.getPackageName() + "/raw/" + sound);
8787
notificationChannel.setSound(soundUri, audioAttributes);
8888
}

0 commit comments

Comments
 (0)