Dev Center
All
Agora.io Community
How can I rate a call?
Type: Integration issues    Platform: Android / iOS / macOS / Windows / Unity   Last Updated: 2020/11/11 20:18:51

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.

After implementing the rating function, you can see users' ratings in Agora Analytics, as shown in the following figure:

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

score