Development environment:

  • Cocos Creator v2.0.9
  • A certified Cocos Creator account (After the sign-up, it takes 1 to 3 days for Cocos Creator to certify your account.)
  • An Android or iOS device for mobile end
  • No VPN connection
  • Ensure the browser for Web end meet the requirements.

Create a new project

If you already have a project, skip this step.

  1. Open Cocos Creator and choose New Project
  1. On the New Project tab, choose Empty Project, select the path file for your project and choose Create.

Now you have created your project as follows:

Enable the Agora Service

  1. Open your project with Cocos Creator. Choose Panel and Service in the drop-down menu. The Service panel appears on the right.

  1. On the Service panel, select the game your just created and click Association.

    When the association completes, the Agora Service panel appears in the Service panel.

  2. Enable the Agora Service panel, and click OK in the pop-up window.

  3. Follow the on-screen instructions and click open service.

  4. Upon opening the service, the following window appears. Click console to go to Agora Dashboard. The Dashboard automatically creates an Agora project. Click open the project and get your Agora App ID.

    Now you successfully enable the Agora Service for your Cocos Creator project and get the Agora App ID. You need the App ID to build and run the sample code. Cocos Creator automatically downloads and configures all the Agora's depenencies.

  1. In your project, call the APIs for voice call in gaming. For detailed information on the core API methods see the HelloAgora Demo

    The JavaScript APIs provided by Cocos Creator only covers major functions. For more advanced functions, see the full API reference documents on other platforms.