通知
本站点除 Legacy 产品与方案外,已迁移至 声网新文档中心 ,当前页面不再维护
Documentation
All
Console 官网 Community Technical support

How can I rate a call?

Type: Integration issues    Platform: Android / iOS / macOS / Windows / Unity   Last Updated: 2022/09/14 23:30:34

When a call ends, you can collect users' subjective evaluation of the call quality experience to improve your product. The Agora RTC SDK provides methods for you to collect your users' ratings and feedbacks.

Implementation

Before proceeding, ensure that you implement a basic video call or live interactive video streaming in your project.

Refer to the following steps to implement the rating function:

  1. When the user is in a channel, call getCallId to get current call ID.
  2. After the user leaves the channel, call rate to rate the call.

Sample code

// Java
// Get current call ID. Rate 5 and give description.
String callId = rtcEngine.getCallId();
rtcEngine.rate(callId, 5, "This is an awesome call!");
// Swift
// Get current call ID. Rate 5 and give description.
agoraKit.rate(agoraKit.getCallId(), 5, "This is an awesome call!");
// Objective-C
// Get current call ID. Rate 5 and give description.
NSString* callId = [agoraKit getCallId];
[agoraKit rate:callId rating:5 description:@"This is an awesome call!"];
// C++
// Get current call ID. Rate 5 and give description.
lpAgoraEngine->getCallId(callId);
lpAgoraEngine->rate(wdCallId, 5, "This is an awesome call!");
// C#
// Get current call ID. Rate 5 and give description.
String callId = mRtcEngine.GetCallId();
mRtcEngine.Rate(callId, 5, "This is an awesome call!");

API reference