Skip to content

Instantly share code, notes, and snippets.

View alizeec's full-sized avatar
💭
I may be slow to respond.

Alizée Camarasa alizeec

💭
I may be slow to respond.
View GitHub Profile
@alizeec
alizeec / AudioService.kt
Created August 6, 2020 08:14
AudioService.kt
class AudioService {
private fun startAudioDevicesWatch(onListChange: (AudioOutput) -> Unit) {
audioDeviceSelector.start { list, selectedDevice ->
println("[AUDIOSDK] when list of devices change selectedAudioDevice = ${selectedDevice?.name} audioDevices = $list")
onListChange(selectedDevice?.let { getAudioOutput(selectedDevice, true) } ?: AudioOutput(AudioOutputType.PHONE, null, true))
}
}
private fun getAudioOutput(audioDevice: AudioDevice, isSelected: Boolean): AudioOutput {
println("[AUDIOSDK] device ${audioDevice.name} is selected ?$isSelected")
@alizeec
alizeec / INavigator.kt
Created February 11, 2020 14:26
Old navigation system at Aircall
interface INavigatorProvider {
fun of(baseActivity: BaseActivity): IInternalNavigator
fun of(appContext: Context): IExternalNavigator
}
interface INavigator {
fun buildIntent(routeOptions: RouteOptions, extras: Bundle?): Intent
}
@alizeec
alizeec / MainActivity
Created March 10, 2018 17:50
Drag and drop Héloïse
public class MainActivity extends AppCompatActivity {
ImageView m_pikachu;
ImageView m_pikachu2;
/** It's now LinearLayout and not ImageView */
LinearLayout m_violet;
LinearLayout m_violet2;
...