Initializing the Support SDK (Required)

You can initialize the Support SDK in yourApplicationsubclass, in anActivity, or anywhere you have access to aContext. Zendesk recommends initializing as early as possible, such as at application start time.

Prerequisites

Getting the initialization settings

You need the following information to initialize the SDK:

  • the URL of your Zendesk Support instance
  • your app's id in Zendesk Support
  • the client id of your app in Zendesk Support

设置在管理中心当t生成he Zendesk admin registered your app:

init settings

If you have admin access to Zendesk Support, sign in and go to管理>Mobile SDK. If you don't have admin access, ask a Zendesk admin to get the information for you.

If your organization's Help Center has ahost-mapped address, then use the host-mapped URL instead of the Zendesk URL.

外接程序g the initialization code

  • Paste the following code snippet in theonCreate()method of theApplicationsubclass orActivity:

                   
    亚博.INSTANCE.init(this,"zendeskUrl","appId","clientId");Support.INSTANCE.init(亚博.INSTANCE);

    Note: If you're usingmultiple brandsyou can use a brand subdomain rather than the primary subdomain in thezendeskUrlin the code above. Keep in mind that the end user will only be able to view tickets that belong to that brand.

    This initializes Zendesk and the Support SDK.

Next you need to set an identity. SeeSetting an identityfor more details.