androidkotlinmesibo

How to change mesibocall background and incall sound


I want to change mesibo call background and PlayInCallSound, this is the code I use to change background on incoming call using IncomingListener enter image description here

How to custom background and incallsound using InProgressListener?, I already read the documentation but still have no idea, can someone provide sample code to do that?

Update: I use mesibo answer below to set defaut ui properties after initialization and its work enter image description here

Now i need to change in call sound using InProgressListener, but still didn't work, here's the code enter image description here


Solution

  • The InProgressListener is invoked after the UI has already been initialized, which is too late to set UI properties like background color.

    To set the UI background color and other UI properties, call the code below during app initialization:

    MesiboCall.UiProperties ui = MesiboCall.getInstance().createCallProperties(true).ui;
    ui.backgroundColor = 0xFF635478; // some random color
    MesiboCall.getInstance().setDefaultUiProperties(ui);
    

    Note that, mesibo uses hexadecimal ARGB color codes.

    You can see an example of this in the mesibo sample app:

    https://github.com/mesibo/samples/blob/master/android/kotlin/FirstAppKotlin/app/src/main/java/com/mesibo/firstapp/MainActivity.kt#L107