Skip to content

Latest commit

 

History

History
88 lines (68 loc) · 5.24 KB

File metadata and controls

88 lines (68 loc) · 5.24 KB

Sample Catalog

The app contains Basic, Advance, and Chat sample groups. Each row lists the app label, source file, and the main feature demonstrated.

If you are new to Agora vocabulary, read Feature Guide For Android Engineers first. It explains what each feature means and why an Android app would use it.

Basic Samples

Sample Source Demonstrates
Join Video Channel (With Token) JoinChannelVideoToken.kt Joining a video channel with a token pasted at runtime.
Join Video Channel JoinChannelVideo.kt Joining a video channel, enabling camera preview, rendering local and remote video. See JoinChannelVideo.
Join Audio Channel JoinChannelAudio.kt Joining an audio-only channel and controlling basic audio parameters.

Advance Samples

Sample Source Demonstrates
Live Streaming LiveStreaming.kt Live broadcasting, audience/co-host role changes, video options, watermark/image source behavior.
RTMP Streaming RTMPStreaming.kt Publishing an RTC stream to an RTMP endpoint with or without transcoding.
Media Metadata MediaMetadata.kt Sending and receiving metadata with media frames.
Voice Effects VoiceEffects.kt Voice effects, audio mixing, and sound effect controls.
Origin Audio Data OriginAudioData.kt Observing raw audio data.
Custom Audio Source CustomAudioSource.kt Publishing custom audio from a local asset instead of microphone input.
Custom Audio Render CustomAudioRender.kt Receiving audio frames and rendering them with a custom player.
Origin Video Data OriginVideoData.kt Observing video frames and saving screenshots.
Custom Video Source CustomVideoSource.kt Publishing custom video frames from a local YUV asset.
Custom Video Render CustomVideoRender.kt Rendering received video frames with custom OpenGL helpers.
Picture In Picture PictureInPicture.kt Android picture-in-picture behavior for a video call screen.
Join Multi Channel JoinMultiChannel.kt Joining a primary channel and an additional channel connection.
Channel Encryption ChannelEncryption.kt Enabling built-in channel encryption with selectable encryption modes.
Play Audio Files PlayAudioFiles.kt Playing audio files and mixing local media into the channel.
Pre Call Test PreCallTest.kt Last-mile probe and audio/video echo tests before joining a channel.
Media Recorder MediaRecorder.kt Recording local or remote media streams.
Media Player MediaPlayer.kt Playing media through Agora media player APIs.
Screen Sharing ScreenSharing.kt Capturing and publishing screen audio/video.
Video Process Extension VideoProcessExtension.kt Beauty, low-light enhancement, denoising, color enhancement, and virtual background controls.
Rhythm Player RhythmPlayer.kt Rhythm/audio playback behavior through Agora APIs.
Local Video Transcoding LocalVideoTranscoding.kt Combining camera and media player sources into a transcoded local video stream.
Send Data Stream SendDataStream.kt Sending custom data messages through an RTC data stream.
Host Across Channel HostAcrossChannel.kt Relaying media across channels.
Spatial Sound SpatialSound.kt Spatial audio positioning and 3D audio effect controls.

Chat Samples

Sample Source Demonstrates
1:1 Chat ChatLab.kt Agora Chat SDK direct messages, GIF image messages with previews, local conversation history, delivery/read callbacks.
Group Chat ChatLab.kt Create or join a Chat group and send text or GIF image messages.
Typing Indicator ChatLab.kt WhatsApp-like typing signals using lightweight Chat command messages.
Presence ChatLab.kt Subscribe to user presence and show online state.
Message Reactions ChatLab.kt Native Chat SDK reactions on message IDs.

Detailed GIF flow: Chat GIF Messages

Chat 1:1 Test Flow

Use two emulators or devices:

  1. Device A: set User ID = a1, Target User ID = a2.
  2. Device B: set User ID = a2, Target User ID = a1.
  3. If the users do not exist yet and client registration is enabled, use Register demo user on each device with password auth. If registration is disabled, run npm run chat:test-tokens and log in with the printed Chat user tokens.
  4. Log in on both devices.
  5. Send text and GIF messages both ways to verify previews, history, delivery/read callbacks, typing, presence, and reactions.

For production, create Chat users and issue Chat user tokens from your backend. Do not use client-side demo registration in a production app.

Sample Assets

The app includes demo assets under app/src/main/assets/:

  • agora-logo.png
  • bg_blue.png
  • music_1.m4a
  • output.raw
  • sample.yuv

These files are used by media, custom source, and rendering examples.

Running a Two-Device Test

  1. Install the app on two devices.
  2. Configure both builds with the same AGORA_APP_ID.
  3. Open the same sample on both devices.
  4. Enter the same channel name.
  5. Join from both devices.

For token-based examples, ensure both devices use valid tokens for the same App ID, channel name, and UID rules.