use of com.azure.android.communication.chat.ChatClientBuilder in project azure-sdk-for-android by Azure.
the class MainActivity method createChatAsyncClient.
public void createChatAsyncClient() {
try {
chatAsyncClient = new ChatClientBuilder().endpoint(endpoint).credential(new CommunicationTokenCredential(firstUserAccessToken)).addPolicy(new UserAgentPolicy(APPLICATION_ID, SDK_NAME, sdkVersion)).httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS).addAllowedHeaderName("MS-CV")).buildAsyncClient();
Log.d(TAG, "Created ChatAsyncClient");
} catch (Exception e) {
Log.e("ChatAsyncClient creation failed", Objects.requireNonNull(e.getMessage()));
}
}
Aggregations