You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/communication-services/quickstarts/chat/includes/chat-android.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -162,9 +162,9 @@ Copy the following code into class `MainActivity` in file `MainActivity.java`:
162
162
> Initializing `ApplicationConstants` needs to be added to `MainActivity.java` if EITHER of the following conditions is met: 1. The push notification feature is NOT enabled. 2. The version for the Azure Communication Chat library for Android is < '2.0.0'. Otherwise, please refer to step 11 in [Android push notifications](../../../tutorials/chat-android-push-notification.md). Please refer to the sample APP of the SDK version that you are consuming for reference.
163
163
164
164
`ACS_ENDPOINT`, `FIRST_USER_ID` and `FIRST_USER_ACCESS_TOKEN` are returned from calling Azure Function. Please check out [Azure Function integration](../../../tutorials/integrate-azure-function.md) for details. We use the response from calling Azure Function to initialize the list of parameters:
165
-
1.`ACS_ENDPOINT`: the endpoint of your Communication Services resource.
166
-
2.`FIRST_USER_ID` and `SECOND_USER_ID`: valid Communication Services user IDs generated by your Communication Services resource.
167
-
3.`FIRST_USER_ACCESS_TOKEN`: the communication Services access token for `<FIRST_USER_ID>`.
165
+
*`ACS_ENDPOINT`: the endpoint of your Communication Services resource.
166
+
*`FIRST_USER_ID` and `SECOND_USER_ID`: valid Communication Services user IDs generated by your Communication Services resource.
167
+
*`FIRST_USER_ACCESS_TOKEN`: the communication Services access token for `<FIRST_USER_ID>`.
168
168
169
169
Code block for initialing application parameters by calling Azure Function:
**Explanation to code above:** The default initializer of `WorkManager` has been disabled in step 9. This step implements `Configuration.Provider` to provide a customized 'WorkFactory', which is responsible to create `WorkerManager` during runtime.
**Explanation to code above**: The first line import the interface for the `CommunicationIdentityClient`. The connection string in the second line can be found in your ACS resource in the Azure Portal. The `ACSEndpoint` is the URL of the ACS resource that was created.
55
+
**Explanation to code above**: The first line import the interface for the `CommunicationIdentityClient`. The connection string in the second line can be found in your ACS resource in the Azure portal. The `ACSEndpoint` is the URL of the ACS resource that was created.
56
56
57
57
5. Open the local Azure Function folder in Visual Studio Code. Open the `index.js` and run the local Azure Function. A local Azure Function endpoint will be created and printed in the terminal. The printed message looks similar to:
6. Deploy the local function to the cloud. More details can be found in [this documentation](../../azure-functions/functions-develop-vs-code.md).
74
74
75
-
7.**Test the deployed Azure Function.** First, find your Azure Function in the Azure Portal. Then, use the "Get Function URL" button to get the Azure Function endpoint. The result you see should be similar to what was shown in step 5. The Azure Function endpoint will be used in the app for initializing application parameters.
75
+
7.**Test the deployed Azure Function.** First, find your Azure Function in the Azure portal. Then, use the "Get Function URL" button to get the Azure Function endpoint. The result you see should be similar to what was shown in step 5. The Azure Function endpoint will be used in the app for initializing application parameters.
76
76
77
77
8. Implement `UserTokenClient`, which is used to call the target Azure Function resource and obtain the ACS endpoint, user ID and user token from the returned JSON object. Refer to the sample app for usage.
78
78
@@ -83,7 +83,7 @@ Open the link in a browser. The result will be similar to this example:
83
83
## (Optional) secure the Azure Function endpoint
84
84
For demonstration purposes, this sample uses a publicly accessible endpoint by default to fetch an Azure Communication Services token. For production scenarios, one option is to use your own secured endpoint to provision your own tokens.
85
85
86
-
With extra configuration, this sample supports connecting to an Azure Active Directory (Azure AD) protected endpoint so that user log in is required for the app to fetch an Azure Communication Services token. The user will be required to sign in with Microsoft account to access the app. This setup increases the security level while users are required to log in. Decide whether to enable it based on the use cases.
86
+
With extra configuration, this sample supports connecting to an Azure Active Directory (Azure AD) protected endpoint so that user log is required for the app to fetch an Azure Communication Services token. The user will be required to sign in with Microsoft account to access the app. This setup increases the security level while users are required to log in. Decide whether to enable it based on the use cases.
87
87
88
88
Note that we currently don't support Azure AD in sample code. Follow the links below to enable it in your app and Azure Function:
0 commit comments