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: fern/docs/pages/plug-sdk/android.mdx
+25-27Lines changed: 25 additions & 27 deletions
Original file line number
Diff line number
Diff line change
@@ -51,7 +51,7 @@ After completing these steps in your `build.gradle` Groovy script, you should be
51
51
</Tab>
52
52
</Tabs>
53
53
54
-
## Set up the DevRev SDK
54
+
###Set up the DevRev SDK
55
55
56
56
1. Open the DevRev web app at [https://app.devrev.ai](https://app.devrev.ai) and go to the **Settings** page.
57
57
2. Under **PLuG settings** copy the value under **Your unique App ID**.
@@ -155,7 +155,7 @@ The identification function should be placed appropriately in your app after the
155
155
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).
156
156
</Callout>
157
157
158
-
####Anonymous identification
158
+
### Anonymous identification
159
159
160
160
The anonymous identification method allows you to create an anonymous user with an optional user identifier, ensuring that no other data is stored or associated with the user.
161
161
@@ -176,7 +176,7 @@ The anonymous identification method allows you to create an anonymous user with
176
176
</Tab>
177
177
</Tabs>
178
178
179
-
####Unverified identification
179
+
### Unverified identification
180
180
181
181
The unverified identification method identifies users with a unique identifier, but it does not verify their identity with the DevRev backend.
182
182
@@ -199,7 +199,7 @@ The unverified identification method identifies users with a unique identifier,
199
199
200
200
The function accepts the `DevRev.Identity` structure, with the user identifier (`userID`) as the only required property, all other properties are optional.
201
201
202
-
####Verified identification
202
+
### Verified identification
203
203
204
204
The verified identification method is used to identify the user with a unique identifier and verify the user's identity with the DevRev backend.
205
205
@@ -261,7 +261,7 @@ Use this property to check whether the user has been provided to the SDK:
261
261
</Tab>
262
262
</Tabs>
263
263
264
-
####Updating the user
264
+
### Updating the user
265
265
266
266
To update a user's information, use the following method:
267
267
@@ -288,7 +288,7 @@ The function accepts the `DevRev.Identity` ojbect.
288
288
The `userID` property cannot be updated.
289
289
</Callout>
290
290
291
-
####Logout
291
+
### Logout
292
292
You can perform a logout of the current user by calling the following method:
293
293
294
294
<Tabs>
@@ -327,7 +327,7 @@ Once user identification is complete, you can start using the chat (conversation
327
327
</Tab>
328
328
</Tabs>
329
329
330
-
####Creating a new conversation
330
+
### Creating a new conversation
331
331
332
332
You have the ability to create a new conversation from within your app. The method will show the support chat screen and create a new conversation at the same time.
333
333
@@ -461,7 +461,7 @@ For example:
461
461
462
462
The DevRev SDK provides observability features to help you understand how your users are interacting with your app.
463
463
464
-
####Opting-in or out
464
+
### Opting-in or out
465
465
466
466
Session analytics features are opted-in by default, enabling them from the start. However, you can opt-out using the following method:
467
467
@@ -514,7 +514,7 @@ If the user was disabled for session recording by using the stopAllMonitoring()
514
514
This feature will only store a monitoring permission flag, it will not provide any UI or dialog.
515
515
</Callout>
516
516
517
-
####Session recording
517
+
### Session recording
518
518
519
519
You can enable session recording to capture user interactions with your app.
520
520
@@ -562,7 +562,7 @@ To check if on-demand sessions are enabled, use:
562
562
</Tab>
563
563
</Tabs>
564
564
565
-
####Session properties
565
+
### Session properties
566
566
567
567
You can add custom properties to the session recording to help you understand the context of the session. The properties are defined as a dictionary of string values.
568
568
@@ -594,13 +594,11 @@ To clear the session properties in scenarios such as user logout or when the ses
594
594
</Tab>
595
595
</Tabs>
596
596
597
-
####Masking sensitive data
597
+
### Masking sensitive data
598
598
To protect sensitive data, the DevRev SDK provides an auto-masking feature that masks data before sending to the server. Input views such as text fields, text views, and web views are automatically masked.
599
599
600
600
While the auto-masking feature may be sufficient for most situations, you can manually mark/unmark additional views as sensitive.
601
601
602
-
##### Mask
603
-
###### Using tag
604
602
> [!NOTE]
605
603
> Use Tag method only when you don't have any other tag already applied to your UI element.
606
604
@@ -634,7 +632,7 @@ You can also set the tag programmatically:
634
632
</Tab>
635
633
</Tabs>
636
634
637
-
######Using API
635
+
### Using API
638
636
639
637
<Tabs>
640
638
<Tabtitle="Kotlin">
@@ -674,8 +672,8 @@ For example:
674
672
</Tab>
675
673
</Tabs>
676
674
677
-
#####Unmask
678
-
######Using tag
675
+
### Unmask
676
+
### Using tag
679
677
> [!NOTE]
680
678
> Use Tag method only when you don't have any other tag already applied to your UI element.
681
679
@@ -710,7 +708,7 @@ You can also set the tag programmatically:
710
708
</Tab>
711
709
</Tabs>
712
710
713
-
######Using API
711
+
### Using API
714
712
715
713
<Tabs>
716
714
<Tabtitle="Kotlin">
@@ -750,7 +748,7 @@ For example:
750
748
</Tab>
751
749
</Tabs>
752
750
753
-
#####Mask jetpack compose views
751
+
### Mask jetpack compose views
754
752
If you want to mask any Jetpack Compose UI element(s) or view(s), you can apply a mask on it using a modifier.
755
753
756
754
```kotlin
@@ -769,23 +767,23 @@ TextField(
769
767
)
770
768
```
771
769
772
-
#####Mask webView elements
770
+
### Mask webView elements
773
771
If you wish to mask any WebView element on a Web page explicitly, you can mask it by using class 'devrev-mask'
774
772
775
773
For example:
776
774
```html
777
775
<labelclass="devrev-mask">OTP: 12345</label>
778
776
```
779
777
780
-
#####Unmask webView elements
778
+
### Unmask webView elements
781
779
If you wish to explicitly un-mask any manually masked WebView element, you can un-mask it by using class 'devrev-unmask'
The DevRev SDK offers a timer mechanism to measure the time spent on specific tasks, allowing you to track events such as response time, loading time, or any other duration-based metrics.
791
789
@@ -844,7 +842,7 @@ For example:
844
842
</Tab>
845
843
</Tabs>
846
844
847
-
####Screen tracking
845
+
### Screen tracking
848
846
849
847
The DevRev SDK offers automatic screen tracking to help you understand how users navigate through your app. Although view controllers are automatically tracked, you can manually track screens using the following method:
850
848
@@ -881,7 +879,7 @@ For example:
881
879
The DevRev SDK allows tracking of screen transitions to understand user navigation within your app.
882
880
You can check if a screen transition is in progress and manually update the state using the following methods:
883
881
884
-
####Check if the screen is transitioning
882
+
### Check if the screen is transitioning
885
883
886
884
<Tabs>
887
885
<Tabtitle="Kotlin">
@@ -896,7 +894,7 @@ You can check if a screen transition is in progress and manually update the stat
896
894
</Tab>
897
895
</Tabs>
898
896
899
-
#####Set screen transitioning state
897
+
### Set screen transitioning state
900
898
901
899
<Tabs>
902
900
<Tabtitle="Kotlin">
@@ -923,7 +921,7 @@ To receive push notifications, you need to configure your DevRev organization by
923
921
924
922
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).
925
923
926
-
####Register for push notifications
924
+
### Register for push notifications
927
925
928
926
<Calloutintent="note">
929
927
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.
@@ -964,7 +962,7 @@ This method will generate and return the device token.
964
962
// Use the token as needed
965
963
```
966
964
967
-
####Unregister from push notifications
965
+
### Unregister from push notifications
968
966
969
967
If your app no longer needs to receive push notifications, you can unregister the device.
970
968
@@ -991,7 +989,7 @@ The method requires the device identifier, which should be the same as the one u
991
989
</Tab>
992
990
</Tabs>
993
991
994
-
####Handle push notifications
992
+
### Handle push notifications
995
993
The DevRev SDK currently does not support automatic handling of push notifications. To open the PLuG chat and manage navigation internally, you must pass the message payload received in the notification to the SDK.
0 commit comments