To meet the laws and regulations of different countries or regions, the Agora RTM SDK supports geofencing. You can limit the data transmission of the RTM SDK to a specific region. After enabling geofencing, the RTM SDK only connects to Agora RTM servers within the specified region.
You need to call setRtmServiceContext
before calling createRtmService
to initialize the RTM client. The RTM SDK supports the following regions:
AREA_CODE_GLOB
: (Default) Global.AREA_CODE_CN
: Mainland China.AREA_CODE_NA
: North America.AREA_CODE_EU
: Europe.AREA_CODE_AS
: Asia excluding mainland China.AREA_CODE_JP
: Japan.AREA_CODE_IN
: India.// Set region for geofencing
RtmServiceContext ctx = new RtmServiceContext();
ctx.areaCode = RtmServiceContext.RtmAreaCode.AREA_CODE_CN | RtmServiceContext.RtmAreaCode.AREA_CODE_AS;
RtmClient.setRtmServiceContext(ctx);
If a firewall is deployed in your network environment, ensure that you add the domains in the following table according to the region you specify, allow all IP addresses, and open the following firewall ports.
Region | Domain |
---|---|
Mainland China | ap.agoraio.cn report-edge.agoraio.cn service-agoraio.cn |
North America | ap-america.agora.io report-america.agora.io service-america.agora.io |
Europe | ap-europe.agora.io report-europe.agora.io service-europe.agora.io |
Japan | ap-japan.agora.io report-japan.agora.io service-japan.agora.io |
India | ap-india.agora.io report-india.agora.io service-india.agora.io |
Asia excluding mainland China | ap-asia.agora.io report-asia.agora.io service-asia.agora.io |