looping the call ringtones instead of relying on the ringtone to contain looping metadata
This commit is contained in:
parent
0d6e8bdeb3
commit
66737c6ec9
|
@ -62,6 +62,10 @@ class CallRingPlayerIncoming(
|
||||||
val ringtoneUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_RINGTONE)
|
val ringtoneUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_RINGTONE)
|
||||||
ringtone = RingtoneManager.getRingtone(applicationContext, ringtoneUri)
|
ringtone = RingtoneManager.getRingtone(applicationContext, ringtoneUri)
|
||||||
Timber.v("Play ringtone for incoming call")
|
Timber.v("Play ringtone for incoming call")
|
||||||
|
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
||||||
|
ringtone?.isLooping = true
|
||||||
|
}
|
||||||
ringtone?.play()
|
ringtone?.play()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue