Get your Application Keys
Signup for CometChat and then:- Create a new app
- Head over to the API Keys section and note the Auth Key, App ID & Region
Minimum Requirement For Calling
- Android API level 24 and above
- iOS version 12 and above
Add the CometChatCalls Dependency
- Add the following code in your
pubspec.yaml
file and runpub get
command.
- Import CometChatCalls using following code in dart
Initialise CometChatCalls
Theinit()
method initialises the settings required for CometChatCalls. The init()
method takes the below parameters:
- callAppSettings - An object of the CallAppSettings class can be created using the CallAppSettingBuilder class. The appId and region field is mandatory and can be set using the
setAppId()
andsetRegion()
method.
CallAppSettings
class allows you to configure three settings:
- App ID: CometChat app ID.
- Region: The region where you app was created.
- Host(host: string): This method takes the client URL as input and uses this client URL instead of the default client URL. This can be used in case of dedicated deployment of CometChat.
init()
method on activity onCreate()
method.
Parameter | Description |
---|---|
callAppSettings | An object of the CallAppSettings class |