# API sunset notice (/en/api-reference/api-ref/voice/api-sunset/android)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

This page lists the deprecated and removed APIs in the SDK and their suggested alternatives.

## Deprecated APIs

A deprecated API is expected to be officially removed in about one year from deprecation. Agora recommends using the alternate API as soon as possible to avoid impacting your online business.

| Deprecated API                           | Description                                                                                   | Alternate API                                   | Deprecating version |
| :--------------------------------------- | :-------------------------------------------------------------------------------------------- | :---------------------------------------------- | :------------------ |
| `startRhythmPlayer`                      | Enables the virtual metronome.                                                                | -                                               | v4.6.0              |
| `configRhythmPlayer`                     | Configures the virtual metronome.                                                             | -                                               | v4.6.0              |
| `onRhythmPlayerStateChanged`             | Occurs when the state of the virtual metronome changes.                                       | -                                               | v4.6.0              |
| `addVideoWatermarkEx [1/2]`              | Adds a watermark image to the local video.                                                    | Use `addVideoWatermarkEx [2/2]` instead.        | v4.6.0              |
| `setRemoteSubscribeFallbackOption [1/2]` | Sets the fallback option for the subscribed video stream based on the network conditions.     | `setRemoteSubscribeFallbackOption [2/2]`        | v4.4.0              |
| `setRemoteVideoStreamType [1/2]`         | Sets the type of the video stream to subscribe to.                                            | `setRemoteVideoStreamType [2/2]`                | v4.4.0              |
| `setRemoteDefaultVideoStreamType [1/2]`  | Sets the default video stream type to subscribe to.                                           | `setRemoteDefaultVideoStreamType [2/2]`         | v4.4.0              |
| `setRemoteVideoStreamTypeEx [1/2]`       | Sets the type of the video stream to subscribe to.                                            | `setRemoteVideoStreamTypeEx [2/2]`              | v4.4.0              |
| `destroy`                                | Destroys the music player.                                                                    | `destroyMusicPlayer`                            | v4.4.0              |
| `enableDualStreamMode [1/2]`             | Enables or disables dual-stream mode on the sender side.                                      | `setDualStreamMode [1/2]`                       | v4.2.0              |
| `enableDualStreamMode [2/2]`             | Sets dual-stream mode and the low video stream on the sender side.                            | `setDualStreamMode [2/2]`                       | v4.2.0              |
| `enableDualStreamModeEx`                 | Enables or disables dual-stream mode on the sender side.                                      | `setDualStreamModeEx`                           | v4.2.0              |
| `enableWebSdkInteroperability`           | Enables interoperability with the Agora Web SDK, applicable only in live streaming scenarios. | -                                               | v4.0.0              |
| `setExternalAudioSource [1/2]`           | Sets the external audio source.                                                               | `createCustomAudioTrack`                        | v4.0.0              |
| `setExternalAudioSource [2/2]`           | Sets the parameters of the external audio source.                                             | `createCustomAudioTrack`                        | v4.0.0              |
| `createDataStreamEx [1/2]`               | Creates a data stream to provide more reliable and ordered data transmission.                 | `createDataStreamEx [2/2]`                      | v4.0.0              |
| `pushExternalVideoFrameById [1/2]`       | Pushes external raw video frames to the SDK through a video track.                            | `pushExternalVideoFrameById [2/2]`              | v4.0.0              |
| `pushExternalVideoFrame [1/2]`           | Pushes external raw video frames to the SDK.                                                  | `pushExternalVideoFrame [2/2]`                  | v4.0.0              |
| `setLocalVideoMirrorMode`                | Sets the local video mirror mode.                                                             | `setupLocalVideo` or `setLocalRenderMode [2/2]` | v4.0.0              |
| `setLocalRenderMode [1/2]`               | Sets the display mode of the local video.                                                     | `setLocalRenderMode [2/2]`                      | v4.0.0              |
| `setLogFileSize`                         | Sets the size of the SDK log file.                                                            | Use the `config` parameter in `create [2/2]`.   | v4.0.0              |
| `setLogFilter`                           | Sets the SDK log filter level.                                                                | Use the `config` parameter in `create [2/2]`.   | v4.0.0              |
| `setLogFile`                             | Sets the SDK log output file.                                                                 | Use the `config` parameter in `create [2/2]`.   | v4.0.0              |
| `setLogLevel`                            | Sets the SDK log output level.                                                                | Use the `config` parameter in `create [2/2]`.   | v4.0.0              |
| `setAudioProfile [1/2]`                  | Sets the audio profile and audio scenario.                                                    | `setAudioProfile [2/2]` or `setAudioScenario`   | v4.0.0              |
| `startAudioMixing [1/2]`                 | Starts playing a music file.                                                                  | `startAudioMixing [2/2]`                        | v4.0.0              |
| `preload [1/2]`                          | Preloads music resources.                                                                     | `preload [2/2]`                                 | v4.0.0              |
| `addVideoWatermark [1/3]`                | Adds a watermark image to the local video.                                                    | `addVideoWatermark [2/3]`                       | v4.0.0              |
| `getBlue`                                | Gets the blue component of the background color.                                              | -                                               | v4.0.0              |
| `getGreen`                               | Gets the green component of the background color.                                             | -                                               | v4.0.0              |
| `getRed`                                 | Gets the red component of the background color.                                               | -                                               | v4.0.0              |
| `setBlue`                                | Sets the blue component of the background color.                                              | -                                               | v4.0.0              |
| `setGreen`                               | Sets the green component of the background color.                                             | -                                               | v4.0.0              |
| `setRed`                                 | Sets the red component of the background color.                                               | -                                               | v4.0.0              |
| `onAudioMixingFinished`                  | Occurs when local music playback finishes.                                                    | `onAudioMixingStateChanged`                     | v4.0.0              |
| `onAudioQuality`                         | Reports the statistics of the audio streams sent by each remote user.                         | `onRemoteAudioStats`                            | v4.0.0              |
| `onConnectionBanned`                     | Occurs when the connection is banned by the Agora server.                                     | `onConnectionStateChanged`                      | v4.0.0              |
| `onConnectionInterrupted`                | Occurs when the connection is interrupted.                                                    | `onConnectionStateChanged`                      | v4.0.0              |
| `onFirstRemoteAudioFrame`                | Occurs when the first remote audio frame is received.                                         | `onRemoteAudioStateChanged`                     | v4.0.0              |
| `onFirstRemoteAudioDecoded`              | Occurs when the first remote audio frame is decoded.                                          | `onRemoteAudioStateChanged`                     | v4.0.0              |
| `onRemoteAudioTransportStats`            | Reports the transport-layer statistics of each remote audio stream.                           | `onRemoteAudioStats`                            | v4.0.0              |
| `onRemoteVideoTransportStats`            | Reports the transport-layer statistics of each remote video stream.                           | `onRemoteVideoStats`                            | v4.0.0              |
| `onUserEnableLocalVideo`                 | Occurs when a specified remote user enables or disables local video capture.                  | `onRemoteVideoStateChanged`                     | v4.0.0              |
| `onVideoStopped`                         | Occurs when video playback stops.                                                             | `onLocalVideoStateChanged`                      | v4.0.0              |

## Removed APIs

The following APIs have been removed from the SDK. Please use the recommended alternative to implement related functions.

| Removed API                               | Description                                                                                        | Alternate API                       | Deleting version |
| :---------------------------------------- | :------------------------------------------------------------------------------------------------- | :---------------------------------- | :--------------- |
| `setLocalPublishFallbackOption`           | Sets the fallback option for the published audio and video stream based on the network conditions. | -                                   | v4.6.0           |
| `onLocalPublishFallbackToAudioOnly`       | Occurs when the local published stream falls back to audio-only.                                   | -                                   | v4.6.0           |
| `onDownlinkNetworkInfoUpdated`            | Occurs when the downlink network information changes.                                              | -                                   | v4.6.0           |
| `enableWirelessAccelerate`                | Enables or disables Wi-Fi acceleration.                                                            | -                                   | v4.6.0           |
| `onWlAccStats`                            | Reports Wi-Fi acceleration statistics.                                                             | -                                   | v4.6.0           |
| `onWlAccMessage`                          | Reports Wi-Fi acceleration messages.                                                               | -                                   | v4.6.0           |
| `WlAccStats`                              | Wi-Fi acceleration statistics.                                                                     | -                                   | v4.6.0           |
| `setVideoProfile`                         | Sets the video encoder configuration.                                                              | `setVideoEncoderConfiguration`      | v4.4.0           |
| `setRemoteRenderMode(userId, renderMode)` | Sets the display mode of the remote view.                                                          | `setRemoteRenderMode`               | v4.4.0           |
| `CreateRendererView`                      | Creates a `RendererView`.                                                                          | Use Android's native `SurfaceView`. | v4.4.0           |
| `CreateTextureView`                       | Creates a `TextureView`.                                                                           | Use Android's native `TextureView`. | v4.4.0           |
| `openWithCustomSource`                    | Opens a custom media resource file.                                                                | `openWithMediaSource`               | v4.4.0           |
| `startEchoTest()`                         | Starts the voice call loop test.                                                                   | `startEchoTest`                     | v4.4.0           |
| `startEchoTest(intervalInSeconds)`        | Starts the voice call loop test.                                                                   | `startEchoTest`                     | v4.4.0           |
| `setEncryptionMode`                       | Enables the built-in encryption scheme.                                                            | `enableEncryption`                  | v4.4.0           |
| `setEncryptionSecret`                     | Enables built-in encryption and sets the data encryption password.                                 | `enableEncryption`                  | v4.4.0           |
| `onEvent`                                 | Plugin event callback.                                                                             | `onEventWithContext`                | v4.4.0           |
| `onStarted`                               | Occurs when the plugin is enabled.                                                                 | `onStartedWithContext`              | v4.4.0           |
| `onStopped`                               | Occurs when the plugin is disabled.                                                                | `onStoppedWithContext`              | v4.4.0           |
| `onError`                                 | Plugin error callback.                                                                             | `onErrorWithContext`                | v4.4.0           |

    
  
      
  
      
  
      
  
      
  
      
  
      
  
      
  
      
  
      
  
      
  
      
  
      
  
