Skip to content

Update chat-android.md with latest steps #127386

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
title: include file
description: include file
services: azure-communication-services
author: probableprime
author: awang119
manager: mikben
ms.service: azure-communication-services
ms.subservice: azure-communication-services
ms.date: 06/30/2021
ms.topic: include
ms.custom: include file
ms.author: rifox
ms.author: anniewang
---

## Prerequisites
Expand All @@ -30,18 +30,19 @@ ms.author: rifox
### Create a new android application

1. Open Android Studio and select `Create a new project`.
2. On the next window, select `Empty Activity` as the project template.
2. On the next window, select `Empty Views Activity` as the project template.
3. When choosing options, enter `ChatQuickstart` as the project name.
4. Click next and choose the directory where you want the project to be created.
4. This sample uses Java as language
5. Click next and choose the directory where you want the project to be created.

### Install the libraries

We use Gradle to install the necessary Communication Services dependencies. From the command line, navigate inside the root directory of the `ChatQuickstart` project. Open the app's build.gradle file and add the following dependencies to the `ChatQuickstart` target:

```groovy
implementation 'com.azure.android:azure-communication-common:' + $azureCommunicationCommonVersion
implementation 'com.azure.android:azure-communication-chat:' + $azureCommunicationChatVersion
implementation 'org.slf4j:slf4j-log4j12:1.7.29'
implementation libs.azure.communication.common
implementation libs.azure.communication.chat
implementation libs.slf4j.log4j12
```

For the latest version numbers, see https://search.maven.org/artifact/com.azure.android/azure-communication-common and https://search.maven.org/artifact/com.azure.android/azure-communication-chat.
Expand Down Expand Up @@ -120,7 +121,6 @@ Copy the following code into class `MainActivity` in file `MainActivity.java`:
private ChatAsyncClient chatAsyncClient;

private void log(String msg) {
Log.i(TAG, msg);
Toast.makeText(this, msg, Toast.LENGTH_LONG).show();
}

Expand Down