-
public final class RingingConfigKt
-
-
Method Summary
Modifier and Type Method Description final static SoundsringingConfig(RingingConfig ringingConfig, MutedRingingConfig mutedRingingConfig)Creates a Sounds object using the provided RingingConfig and MutedRingingConfig. final static RingingConfigdefaultResourcesRingingConfig(Context context)Returns a RingingConfig that uses the SDK's default bundled sounds for both incoming and outgoing calls. final static MutedRingingConfigdefaultMutedRingingConfig(Boolean playIncomingSoundIfMuted, Boolean playOutgoingSoundIfMuted)Creates a default MutedRingingConfig. final static RingingConfigdeviceRingtoneRingingConfig(Context context)Returns a RingingConfig that uses the device ringtone for incoming calls and the SDK default ringing tone for outgoing calls. final static RingingConfigresRingingConfig(Context context, @RawRes() Integer incomingCallSoundResId, @RawRes() Integer outgoingCallSoundResId)Returns a RingingConfig that uses custom resources for incoming and outgoing call sounds. final static RingingConfiguriRingingConfig(Uri incomingCallSoundUri, Uri outgoingCallSoundUri)Returns a RingingConfig that uses custom URIs for incoming and outgoing call sounds. final static RingingConfigemptyRingingConfig()Returns a RingingConfig that disables all ringing sounds. final static SoundstoSounds(RingingConfig $self)Converts a ringing config to a Sounds object. -
-
Method Detail
-
ringingConfig
final static Sounds ringingConfig(RingingConfig ringingConfig, MutedRingingConfig mutedRingingConfig)
Creates a Sounds object using the provided RingingConfig and MutedRingingConfig.
- Parameters:
ringingConfig- The configuration for incoming and outgoing call sounds.mutedRingingConfig- The configuration for handling incoming and outgoing call sounds if device is muted.
-
defaultResourcesRingingConfig
final static RingingConfig defaultResourcesRingingConfig(Context context)
Returns a RingingConfig that uses the SDK's default bundled sounds for both incoming and outgoing calls.
- Parameters:
context- Used to resolve the internal audio resources.
-
defaultMutedRingingConfig
final static MutedRingingConfig defaultMutedRingingConfig(Boolean playIncomingSoundIfMuted, Boolean playOutgoingSoundIfMuted)
Creates a default MutedRingingConfig.
- Parameters:
playIncomingSoundIfMuted- Whether the incoming call sound should still play when the device is muted.playOutgoingSoundIfMuted- Whether the outgoing ringing sound should still play when the device is muted.
-
deviceRingtoneRingingConfig
final static RingingConfig deviceRingtoneRingingConfig(Context context)
Returns a RingingConfig that uses the device ringtone for incoming calls and the SDK default ringing tone for outgoing calls.
- Parameters:
context- Context used for retrieving the sounds.
-
resRingingConfig
final static RingingConfig resRingingConfig(Context context, @RawRes() Integer incomingCallSoundResId, @RawRes() Integer outgoingCallSoundResId)
Returns a RingingConfig that uses custom resources for incoming and outgoing call sounds.
- Parameters:
context- Context used for retrieving the sounds.incomingCallSoundResId- The resource ID for the incoming call sound.outgoingCallSoundResId- The resource ID for the outgoing call sound.
-
uriRingingConfig
final static RingingConfig uriRingingConfig(Uri incomingCallSoundUri, Uri outgoingCallSoundUri)
Returns a RingingConfig that uses custom URIs for incoming and outgoing call sounds.
- Parameters:
incomingCallSoundUri- The URI for the incoming call sound.outgoingCallSoundUri- The URI for the outgoing call sound.
-
emptyRingingConfig
final static RingingConfig emptyRingingConfig()
Returns a RingingConfig that disables all ringing sounds.
Both incoming and outgoing call sounds will be muted.
-
toSounds
final static Sounds toSounds(RingingConfig $self)
Converts a ringing config to a Sounds object.
-
-
-
-