๐ฒ Android Video SDK. Stream's versatile Core + Compose UI component libraries that allow you to build video calling, audio room, and, live streaming apps based on Webrtc running on Stream's global edge network.
Refactor sound configuration. Add possibility to use device ringtone for incoming call sound.
๐ Implementation details
Added SoundConfig interface to be used in Sounds constructor.
Deprecated current Sounds constructor.
Added several static factory methods in SoundConfig: createDeviceRingtoneSoundConfig, createStreamResourcesSoundConfig, createEmptySoundConfig.
Added a factory method for custom configs, createCustomSoundConfig.
Allows user to specify custom sounds for incoming and outgoing calls. The sounds can be either resource IDs or URIs.
Using the device ringtone as default.
Moved Sounds section from UI Cookbook/Incoming & Outgoing to Advanced/Ringing and updated it. Kept link in the original page. See here.
๐งช Testing
Cases:
Default Sounds in Builder: outgoing - default tone provided by SDK, incoming - device ringtone.
Use deprecated Sounds constructor: marked as deprecated & using passed sounds.
Pass custom sound res to Sounds property: the custom sound will be used.
Pass null to Sounds property: that sound will be disabled (muted).
Device ringtone evaluates to null: fallback to default SDK incoming sound.
Device uses external storage ringtone and app doesn't have READ_EXTERNAL_STORAGE permission: RingtoneManager.getActualDefaultRingtoneUri() will evaluate to null, fallback as above.
๐ฏ Goal
Refactor sound configuration. Add possibility to use device ringtone for incoming call sound.
๐ Implementation details
SoundConfig
interface to be used inSounds
constructor.Sounds
constructor.SoundConfig
:createDeviceRingtoneSoundConfig
,createStreamResourcesSoundConfig
,createEmptySoundConfig
.createCustomSoundConfig
.๐งช Testing
Cases:
Sounds
inBuilder
: outgoing - default tone provided by SDK, incoming - device ringtone.Sounds
constructor: marked as deprecated & using passed sounds.Sounds
property: the custom sound will be used.null
toSounds
property: that sound will be disabled (muted).null
: fallback to default SDK incoming sound.READ_EXTERNAL_STORAGE
permission:RingtoneManager.getActualDefaultRingtoneUri()
will evaluate tonull
, fallback as above.๐ GIF