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
* Fix the Android SDK callouts
* Fix the iOS SDK callouts
* Fix the React Native and Expo SDK callouts
* Fix the Cordova SDK callouts
* Fix the Flutter SDK callouts
* Fix a missing callout in the Cordova SDK
* Follow the language recommendation by EKLine in the mobile SDKs
* Fix a present tense issue in the mobile SDKs
* Fix the case of a heading
* Use the proper verb for switching directories
* Update the iOS quickstart
* Fix the slug for the push notifications guide
Copy file name to clipboardExpand all lines: fern/docs/pages/sdks/mobile/android/features.mdx
+73-63Lines changed: 73 additions & 63 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ To access certain features of the DevRev SDK, user identification is required.
6
6
7
7
The identification function should be placed appropriately in your app after the user logs in. If you have the user information available at app launch, call the function after the `DevRev.configure(context, appID)` method.
8
8
9
-
<Calloutintent="note">
9
+
<Calloutintent="tip">
10
10
The `Identity` structure allows for custom fields in the user, organization, and account traits. These fields must be configured through the DevRev app before they can be utilized. For more information, refer to [Object customization](https://devrev.ai/docs/product/object-customization).
11
11
</Callout>
12
12
@@ -48,7 +48,7 @@ The unverified identification method identifies users with a unique identifier,
48
48
DevRev.INSTANCE.identifyUnverifiedUser(
49
49
Identity identity
50
50
);
51
-
```
51
+
```
52
52
</Tab>
53
53
</Tabs>
54
54
@@ -73,7 +73,6 @@ For example:
73
73
</Tab>
74
74
</Tabs>
75
75
76
-
77
76
### Verified identification
78
77
79
78
The verified identification method is used to identify users with an identifier unique to your system within the DevRev platform. The verification is done through a token exchange process between you and the DevRev backend.
@@ -83,25 +82,30 @@ The steps to identify a verified user are as follows:
83
82
2. Exchange your AAT for a session token for each user of your system.
84
83
3. Pass the user identifier and the exchanged session token to the `DevRev.identifyVerifiedUser(_:sessionToken:)` method.
85
84
86
-
> [!CAUTION]
87
-
> For security reasons we **strongly recommend** that the token exchange is executed on your backend to prevent exposing your application access token (AAT).
85
+
<Calloutintent="warning">
86
+
For security reasons, it is **strongly recommended** that the token exchange is executed on your backend to prevent exposing your application access token (AAT).
87
+
</Callout>
88
88
89
89
#### Generate an AAT
90
90
91
91
1. Open the DevRev web app at [https://app.devrev.ai](https://app.devrev.ai) and go to the **Settings** page.
92
92
2. Open the **PLuG Tokens** page.
93
93
3. Under the **Application access tokens** panel, click **New token** and copy the token that's displayed.
94
94
95
-
> [!IMPORTANT]
96
-
> Ensure that you copy the generated application access token, as you cannot view it again.
95
+
<Calloutintent="warning">
96
+
Ensure that you copy the generated application access token, as you cannot view it again.
97
+
</Callout>
97
98
98
99
#### Exchange your AAT for a session token
99
100
100
-
In order to proceed with identifying the user, you need to exchange your AAT for a session token. This step will help you identify a user of your own system within the DevRev platform.
101
+
To proceed with identifying the user, you need to exchange your AAT for a session token. This step helps you identify a user of your own system within the DevRev platform.
101
102
102
103
Here is a simple example of an API request to the DevRev backend to exchange your AAT for a session token:
103
-
> [!CAUTION]
104
-
> Make sure that you replace the `<AAT>` and `<YOUR_USER_ID>` with the actual values.
104
+
105
+
<Calloutintent="warning">
106
+
Make sure that you replace the `<AAT>` and `<YOUR_USER_ID>` with the actual values.
The response of the API call will contain a session token that you can use with the verified identification method in your app.
122
+
The response of the API call contains a session token that you can use with the verified identification method in your app.
119
123
120
-
> [!NOTE]
121
-
> As a good practice, **your** app should retrieve the exchanged session token from **your** backend at app launch or any relevant app lifecycle event.
124
+
<Calloutintent="warning">
125
+
As a good practice, **your** app should retrieve the exchanged session token from **your** backend at app launch or any relevant app lifecycle event.
126
+
</Callout>
122
127
123
128
#### Identifying the verified user
124
129
@@ -160,7 +165,7 @@ DevRev.INSTANCE.updateUser(
160
165
161
166
The function accepts the `DevRev.Identity` ojbect.
162
167
163
-
<Calloutintent="note">
168
+
<Calloutintent="warning">
164
169
The `userID` property cannot be updated.
165
170
</Callout>
166
171
@@ -181,7 +186,7 @@ You can perform a logout of the current user by calling the following method:
181
186
</Tab>
182
187
</Tabs>
183
188
184
-
The user will be logged out by clearing their credentials, as well as unregistering the device from receiving push notifications, and stopping the session recording.
189
+
The user is logged out by clearing their credentials, as well as unregistering the device from receiving push notifications, and stopping the session recording.
185
190
186
191
### Identity model
187
192
@@ -200,15 +205,18 @@ The `Identity` class contains the following properties:
200
205
|`organizationTraits`|`OrganizationTraits?`| ❌ | Additional information about the organization |
201
206
|`accountTraits`|`AccountTraits?`| ❌ | Additional information about the account |
202
207
203
-
> [!NOTE]
204
-
> The custom fields properties defined as part of the user, organization and account traits, must be configured in the DevRev web app **before** they can be used. See [Object customization](https://devrev.ai/docs/product/object-customization) for more information.
208
+
<Calloutintent="note">
209
+
The custom fields properties defined as part of the user, organization and account traits, must be configured in the DevRev web app **before** they can be used. See [Object customization](https://devrev.ai/docs/product/object-customization) for more information.
210
+
</Callout>
205
211
206
-
##### UserTraits
212
+
##### User traits
207
213
208
214
The `UserTraits` class contains detailed information about the user:
209
215
210
-
> [!NOTE]
211
-
> All properties in `UserTraits` are optional.
216
+
<Calloutintent="note">
217
+
All properties in `UserTraits` are optional.
218
+
</Callout>
219
+
212
220
| Property | Type | Description |
213
221
|----------|------|-------------|
214
222
|`displayName`|`String?`| The displayed name of the user |
@@ -218,12 +226,14 @@ The `UserTraits` class contains detailed information about the user:
218
226
|`phoneNumbers`|`[String]?`| Array of the user's phone numbers |
219
227
|`customFields`|`[String: Any]?`| Dictionary of custom fields configured in DevRev |
220
228
221
-
##### OrganizationTraits
229
+
##### Organization traits
222
230
223
231
The `OrganizationTraits` class contains detailed information about the organization:
224
232
225
-
> [!NOTE]
226
-
> All properties in `OrganizationTraits` are optional.
233
+
<Calloutintent="note">
234
+
All properties in `OrganizationTraits` are optional.
235
+
</Callout>
236
+
227
237
| Property | Type | Description |
228
238
|----------|------|-------------|
229
239
|`displayName`|`String?`| The displayed name of the organization |
@@ -233,12 +243,14 @@ The `OrganizationTraits` class contains detailed information about the organizat
233
243
|`tier`|`String?`| The organization's tier or plan level |
234
244
|`customFields`|`[String: Any]?`| Dictionary of custom fields configured in DevRev |
235
245
236
-
##### AccountTraits
246
+
##### Account traits
237
247
238
248
The `AccountTraits` class contains detailed information about the account:
239
249
240
-
> [!NOTE]
241
-
> All properties in `AccountTraits` are optional.
250
+
<Calloutintent="note">
251
+
All properties in `AccountTraits` are optional.
252
+
</Callout>
253
+
242
254
| Property | Type | Description |
243
255
|----------|------|-------------|
244
256
|`displayName`|`String?`| The displayed name of the account |
@@ -257,12 +269,12 @@ Once user identification is complete, you can start using the chat (conversation
@@ -545,8 +557,8 @@ While the auto-masking feature may be sufficient for most situations, you can ma
545
557
546
558
##### Using tag
547
559
548
-
<Calloutintent="note">
549
-
Use Tag method only when you don't have any other tag already applied to your UI element.
560
+
<Calloutintent="tip">
561
+
Use the tag method only when you don't have any other tag already applied to your UI element.
550
562
</Callout>
551
563
552
564
```xml
@@ -581,7 +593,6 @@ You can also set the tag programmatically:
581
593
</Tab>
582
594
</Tabs>
583
595
584
-
585
596
##### Using API
586
597
587
598
<Tabs>
@@ -626,8 +637,8 @@ For example:
626
637
627
638
##### Using tag
628
639
629
-
<Calloutintent="note">
630
-
Use Tag method only when you don't have any other tag already applied to your UI element.
640
+
<Calloutintent="tip">
641
+
Use the tag method only when you don't have any other tag already applied to your UI element.
631
642
</Callout>
632
643
633
644
```xml
@@ -748,22 +759,22 @@ For advanced use cases, you can provide a custom masking provider to explicitly
748
759
749
760
You can implement your own masking logic by creating a class that implements the `MaskLocationProvider` interface and setting your custom object as the masking provider. This allows you to specify explicit regions to be masked or to skip snapshots entirely.
@@ -944,16 +955,15 @@ You can configure your app to receive push notifications from the DevRev SDK. Th
944
955
945
956
The DevRev backend sends push notifications to your app to notify users about new messages in the PLuG support chat.
946
957
947
-
<Calloutintent="note">
948
-
To receive push notifications, you need to configure your DevRev organization by following the instructions in the [push notifications](../push-notification) section.
958
+
### Configuration
949
959
950
-
You need to ensure that your Android app is configured to receive push notifications. To set it up, follow the [Firebase documentation](https://firebase.google.com/docs/cloud-messaging/android/client).
951
-
</Callout>
960
+
To receive push notifications, you need to configure your DevRev organization by following the instructions in the [push notifications](../push-notifications) section.
952
961
962
+
You need to ensure that your Android app is configured to receive push notifications. You can follow the [Android documentation](https://developer.android.com/training/notify-user/build-notification) for guidance on registering your app with Firebase Cloud Messaging (FCM).
953
963
954
964
### Register for push notifications
955
965
956
-
<Calloutintent="note">
966
+
<Calloutintent="tip">
957
967
Push notifications require that the SDK has been configured and the user has been identified (unverified and anonymous users). The user identification is required to send the push notification to the correct user.
958
968
</Callout>
959
969
@@ -1005,15 +1015,15 @@ The method requires the device identifier, which should be the same as the one u
0 commit comments