# About ringtone after joining session

**URL:** <https://devforum.zoom.us/t/about-ringtone-after-joining-session/120748>\
**Category:** Android\
**Tags:** phone\
**Created:** [November 12, 2024, 8:43am UTC](https://devforum.zoom.us/t/about-ringtone-after-joining-session/120748 "2024-11-12T08:43:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Watasan](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/watasan/32/64875_2.png) [@Watasan](https://devforum.zoom.us/u/Watasan)\
**Post date:** [November 12, 2024, 8:43am UTC](https://devforum.zoom.us/t/about-ringtone-after-joining-session/120748/1 "2024-11-12T08:43:22Z")

</div>

Hello,

Phenomenon)  
I’m playing ringtone from earpiece of the device, but after joining session and ZoomVideoSDKDelegate.onSessionJoin() event raised, ringtone becomes being played from speakerphone of the device.

What I tried)  
I’ve tried to change it playing from earpiece again as the following with using android.media.AudioManager, but could not change it.

Step1) Change mode of AudioManager

```kotlin
audioManager.mode = AudioManager.MODE_RINGTONE

```

Step2) Prepare AudioDeviceInfo for earpiece

```kotlin
val device: AudioDeviceInfo? = with(audioManager.availableCommunicationDevices) {
    find { it.type == AudioDeviceInfo.TYPE_BUILTIN_EARPIECE }
}

```

Step3) Set earpiece as communication device

```kotlin
device?.let {
    audioManager.setCommunicationDevice(it)
}

```

Inquiry)  
Would there be a way to change it to earpiece again?

Environment)  
Platform: Android  
Zoom SDK: us.zoom.videosdk:zoomvideosdk-core=1.12.5  
Test Device: Pixel 3a (Android ver. 12.0)

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [December 12, 2024, 6:43pm UTC](https://devforum.zoom.us/t/about-ringtone-after-joining-session/120748/2 "2024-12-12T18:43:40Z")

</div>

Closed on December 12, 2024, 6:43pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
