Updated on 2023-03-23 GMT+08:00

Configuring an Access Site

You can configure a custom server access site (such as Asia Pacific and Chinese mainland) in OpenSDKConfig.

The default site is Chinese mainland.

Application Scenarios

Users outside the Chinese mainland can access the near Asia Pacific site.

Precautions

sdkConfig takes effect only when this configuration is passed during SDK initialization.

Sample Code

1
2
3
4
5
6
7
public class MSiteTypeStrategy implements ISiteTypeStrategy {
    @Override
    public SiteType getSiteType() {
        return SiteType.SITE_TYPE_HEC_AP;
    }
}
sdkConfig.setSiteTypeStrategy(new MSiteTypeStrategy());

Table 1 SiteType description

Enumerated Value

Description

SiteType.SITE_TYPE_HEC_CN

Chinese mainland.

SiteType.SITE_TYPE_HEC_AP

Asia Pacific.

  • You can customize the default access site as the Chinese mainland or Asia Pacific site. The default login server address varies depending on the site.
  • If no access site is set, the Chinese mainland site is used by default.