mirror of
				https://github.com/SimpleMobileTools/Simple-Clock.git
				synced 2025-06-05 22:19:17 +02:00 
			
		
		
		
	set alarm stream type at the alarm sound
This commit is contained in:
		@@ -324,9 +324,9 @@ fun Context.getAlarmNotification(pendingIntent: PendingIntent, alarm: Alarm, add
 | 
			
		||||
    val label = if (alarm.label.isNotEmpty()) alarm.label else getString(R.string.alarm)
 | 
			
		||||
    if (isOreoPlus()) {
 | 
			
		||||
        val audioAttributes = AudioAttributes.Builder()
 | 
			
		||||
                .setUsage(AudioAttributes.USAGE_NOTIFICATION)
 | 
			
		||||
                .setUsage(AudioAttributes.USAGE_ALARM)
 | 
			
		||||
                .setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
 | 
			
		||||
                .setLegacyStreamType(AudioManager.STREAM_SYSTEM)
 | 
			
		||||
                .setLegacyStreamType(AudioManager.STREAM_ALARM)
 | 
			
		||||
                .setFlags(AudioAttributes.FLAG_AUDIBILITY_ENFORCED)
 | 
			
		||||
                .build()
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user