From dc0000a0f0d903b249ed92c1cecda7fc03b72f65 Mon Sep 17 00:00:00 2001 From: Yug Date: Thu, 10 Apr 2025 16:01:13 +0530 Subject: [PATCH 1/8] Improve section titles and structure --- fern/docs/pages/plug-sdk/android.mdx | 601 +++++++++++++++++++++++---- 1 file changed, 519 insertions(+), 82 deletions(-) diff --git a/fern/docs/pages/plug-sdk/android.mdx b/fern/docs/pages/plug-sdk/android.mdx index fc2042e2..b840e25b 100644 --- a/fern/docs/pages/plug-sdk/android.mdx +++ b/fern/docs/pages/plug-sdk/android.mdx @@ -1,13 +1,13 @@ This section describes the process of integrating the DevRev SDK with your Android app. - -## Requirements +## Quickstart guide +### Requirements - Android Studio 2022.1.1 or later - Android Gradle plugin version 7.4 or later - Gradle version 7.6 or later - Minimum Android SDK 24 -## Integration +### Integration To integrate the latest version of our SDK into your app, follow these steps: @@ -53,8 +53,12 @@ After completing these steps in your `build.gradle` Groovy script, you should be ## Set up the DevRev SDK -1. In DevRev, go to **Settings** > **PLuG settings** to obtain **Your unique App ID** (referred to as `supportID` in the code). -2. After obtaining the credentials, you can configure the DevRev SDK in your app. The SDK will be ready for use once you execute the configuration method. +1. Open the DevRev web app at [https://app.devrev.ai](https://app.devrev.ai) and go to the **Settings** page. +2. Under **PLuG settings** copy the value under **Your unique App ID**. +3. After obtaining the credentials, you can configure the DevRev SDK in your app. + +The SDK will be ready for use once you execute the following configuration method. + ```kotlin @@ -67,7 +71,27 @@ After completing these steps in your `build.gradle` Groovy script, you should be ``` -3. To configure the SDK, you need to call the following method inside your `Application` class: + +Use this property to check whether the DevRev SDK has been configured: + + + + ```kotlin + DevRev.isConfigured + ``` + + + ```java + DevRev.INSTANCE.isConfigured(); + ``` + + + + +`prefersDialogMode`, if set to true, enables the SDK to open the screens in the app's main task/activity + + +4. To configure the SDK, you need to call the following method inside your `Application` class: If you don’t have a custom `Application` class, create one as shown below. @@ -77,9 +101,9 @@ If you don’t have a custom `Application` class, create one as shown below. ```kotlin import ai.devrev.sdk.DevRev - + class MyApp : Application() { - + override fun onCreate() { super.onCreate() DevRev.configure( @@ -93,9 +117,9 @@ If you don’t have a custom `Application` class, create one as shown below. ```java import ai.devrev.sdk.DevRev; - + public class MyApp extends Application { - + @Override public void onCreate() { super.onCreate(); @@ -109,8 +133,8 @@ If you don’t have a custom `Application` class, create one as shown below. -4. In the `onCreate` method of your `Application`, configure the DevRev SDK with the required parameters using the credentials obtained earlier. -5. Ensure that the custom application is specified in the `AndroidManifest.xml`, as shown below: +5. In the `onCreate` method of your `Application`, configure the DevRev SDK with the required parameters using the credentials obtained earlier. +6. Ensure that the custom application is specified in the `AndroidManifest.xml`, as shown below: ```xml ``` -## Identification +## Features +### Identification -To use certain features of the DevRev SDK, user identification is required. You can select from the following methods to identify users within your application: +To access certain features of the DevRev SDK, user identification is required. 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. @@ -130,9 +155,9 @@ The identification function should be placed appropriately in your app after the 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). -### Anonymous identification +#### Anonymous identification -The anonymous identification method allows you to create an anonymous user with an optional or random user identifier, ensuring that no other data is stored or associated with the user. +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. @@ -151,7 +176,7 @@ The anonymous identification method allows you to create an anonymous user with -### Unverified identification +#### Unverified identification The unverified identification method identifies users with a unique identifier, but it does not verify their identity with the DevRev backend. @@ -168,49 +193,92 @@ The unverified identification method identifies users with a unique identifier, DevRev.INSTANCE.identifyUnverifiedUser( Identity identity ); - ``` + ``` -The function accepts the `Identity` object, where the user identifier (`userId`) is the only required property; all other properties are optional. +The function accepts the `DevRev.Identity` structure, with the user identifier (`userID`) as the only required property, all other properties are optional. + +#### Verified identification + +The verified identification method is used to identify the user with a unique identifier and verify the user's identity with the DevRev backend. + + + + ```kotlin + DevRev.identifyVerifiedUser( + userId: String, + sessionToken: String + ) + ``` + + + ```java + DevRev.INSTANCE.identifyVerifiedUser( + String userId, + String sessionToken + ); + ``` + + For example: ```kotlin - // Identify an unverified user using their email address as the user identifier. - DevRev.identifyUnverifiedUser(Identity(userId = "user@example.org")) + // Identify an unverified user using their email address as the user identifier. + DevRev.identifyUnverifiedUser( + Identity(userId = "user@example.org") + ) ``` ```java // Identify an unverified user using their email address as the user identifier. DevRev.identifyUnverifiedUser( - new Identity("user@example.org", null, null, null, null, null) + new Identity("user@example.org", null, null, null, null, null) ); ``` -## Update user information + +The identification function should be placed at the appropriate place in your app after you login your user. If you have the user information at app launch, call the function after the `DevRev.configure(context, appID)` method. + +Use this property to check whether the user has been provided to the SDK: + + + + ```kotlin + DevRev.isUserIdentified + ``` + + + ```java + DevRev.INSTANCE.isUserIdentified(); + ``` + + + +#### Updating the user To update a user's information, use the following method: ```kotlin -DevRev.updateUser( - identity: Identity -) -``` + DevRev.updateUser( + identity: Identity + ) + ``` - ```java -DevRev.INSTANCE.updateUser( - Identity identity -); -``` + ```java + DevRev.INSTANCE.updateUser( + Identity identity + ); + ``` @@ -220,7 +288,29 @@ The function accepts the `DevRev.Identity` ojbect. The `userID` property cannot be updated. -## PLuG support chat +#### Logout +You can perform a logout of the current user by calling the following method: + + + + ```kotlin + DevRev.logout( + context: Context, + deviceId: String + ) + ``` + + + ```java + DevRev.INSTANCE.logout( + Context context, String deviceId); + ``` + + + +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. + +### PLuG support chat Once user identification is complete, you can start using the chat (conversations) dialog supported by our DevRev SDK. To open the chat dialog, your application should use the `showSupport` API, as shown in the following example: @@ -228,12 +318,29 @@ Once user identification is complete, you can start using the chat (conversation ```kotlin DevRev.showSupport(context: Context) - ``` + ``` ```java DevRevExtKt.showSupport(DevRev.INSTANCE, context); - ``` + ``` + + + +#### Creating a new conversation + +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. + + + + ```kotlin + DevRev.createSupportConversation(context: Context) + ``` + + + ```java + DevRev.INSTANCE.createSupportConversation(context); + ``` @@ -248,7 +355,7 @@ The DevRev SDK also provides a support button, which can be integrated into your app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" /> ``` -The support button can be customized using default parameters, enabling you to tailor its appearance to your application's design. +The support button can also accept default parameters like ```kotlin android:src="@your_drawable_here" @@ -261,9 +368,66 @@ android:backgroundTint="@your_background_color" At this stage, your app is fully configured to utilize all functionalities of the DevRev SDK. Pressing the support button directs the user to the chat interface, enabling effective interaction and support. -## Analytics +### In-app link handling +The DevRev SDK provides a mechanism to handle links opened from within any screen that is part of the DevRev SDK. -The DevRev SDK allows you to send custom analytic events by using a name and a string hashmap. You can track these events using the following function: +You can fully customize the link handling behavior by setting the specialized in-app link handler. That way you can decide what should happen when a link is opened from within the app. + + + + ```kotlin + DevRev.setInAppLinkHandler(handler: (String) -> Unit) + ``` + + + ```java + DevRev.INSTANCE.setInAppLinkHandler(Function1 handler) + ``` + + + +You can further customize the behavior by setting the `setShouldDismissModalsOnOpenLink` boolean flag. This flag controls whether the DevRev SDK should dismiss the top-most modal screen when a link is opened. + + + + ```kotlin + DevRev.setShouldDismissModalsOnOpenLink(value: boolean) + ``` + + + ```java + DevRev.INSTANCE.setShouldDismissModalsOnOpenLink(boolean value) + ``` + + + +For example: + + + + ```kotlin + DevRev.setInAppLinkHandler { link -> + // Do something here + } + + DevRev.setShouldDismissModalsOnOpenLink(false) + ``` + + + ```java + DevRev.INSTANCE.setInAppLinkHandler(link -> { + // Do something here + return kotlin.Unit.INSTANCE; + }); + + DevRev.INSTANCE.setShouldDismissModalsOnOpenLink(false); + ``` + + + +### Analytics + +The DevRev SDK allows you to send custom analytic events by using a name and a string dictionary. You can track these events using the following function: @@ -295,11 +459,11 @@ For example: ## Session analytics -The DevRev SDK offers session analytics features to help you understand how users interact with your app. +The DevRev SDK provides observability features to help you understand how your users are interacting with your app. -### Opt in or out +#### Opting-in or out -End users can opt in or out of the session analytics feature, enabling them to control whether their interactions are tracked for analytics. +Session analytics features are opted-in by default, enabling them from the start. However, you can opt-out using the following method: @@ -314,7 +478,7 @@ End users can opt in or out of the session analytics feature, enabling them to c -This method terminates and deletes the current session recording and also disables future session recording by our SDK for this user. +To opt back in, use the following method: @@ -329,13 +493,28 @@ This method terminates and deletes the current session recording and also disabl -If session recording was disabled for the user using the `stopAllMonitoring()` method, you can enable recording at runtime with this method. +You can check whether session monitoring has been enabled by using this property: + + + + ```kotlin + DevRev.isMonitoringEnabled + ``` + + + ```java + DevRevObservabilityExtKt.isMonitoringEnabled(DevRev.INSTANCE); + ``` + + + +If the user was disabled for session recording by using the stopAllMonitoring() method, you can use this method to enable recording at runtime. -This feature only stores a monitoring permission flag and does not provide any user interface or dialog. +This feature will only store a monitoring permission flag, it will not provide any UI or dialog. -### Session recording +#### Session recording You can enable session recording to capture user interactions with your app. @@ -345,31 +524,62 @@ The session recording feature is opt-out and is enabled by default. Here are the available methods to help you control the session recording feature: -|Action |Kotlin (`DevRev`) |Java (`DevRevObservabilityExtKt`) | +|Kotlin |Java |Action | |---|---|---| -|Starts the session recording. |startRecording() |startRecording(DevRev.INSTANCE, context); | -|Ends the session recording and uploads it to the portal. |stopRecording() |stopRecording(DevRev.INSTANCE); | -|Pauses the ongoing session recording. |pauseRecording() |pauseRecording(DevRev.INSTANCE); | -|Resumes a paused session recording. |resumeRecording() |resumeRecording(DevRev.INSTANCE); | +| DevRev.startRecording() | DevRevObservabilityExtKt.startRecording(DevRev.INSTANCE, context); | Starts the session recording. | +| DevRev.stopRecording() | DevRevObservabilityExtKt.stopRecording(DevRev.INSTANCE); | Stops the session recording and uploads it to the portal. | +| DevRev.pauseRecording() | DevRevObservabilityExtKt.pauseRecording(DevRev.INSTANCE); | Pauses the ongoing session recording. | +| DevRev.resumeRecording() | DevRevObservabilityExtKt.resumeRecording(DevRev.INSTANCE); | Resumes a paused session recording. | +| DevRev.processAllOnDemandSessions() | DevRevObservabilityExtKt.processAllOnDemandSessions(DevRev.INSTANECE); | Stops the ongoing user recording and uploads all offline sessions on demand, including the current one. | + +Using this property will return the status of the session recording: + + + + ```kotlin + DevRev.isRecording + ``` + + + ```java + DevRevObservabilityExtKt.isRecording(DevRev.INSTANCE); + ``` + + + +To check if on-demand sessions are enabled, use: + + + + ```kotlin + DevRev.areOnDemandSessionsEnabled + ``` + + + ```java + DevRevObservabilityExtKt.areOnDemandSessionsEnabled(DevRev.INSTANCE); + ``` + + -### Session properties +#### Session properties -You can add custom properties to the session recording to help you understand the context of the session. The properties are defined as a hashmap of string values. +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. ```kotlin DevRev.addSessionProperties(properties: HashMap) - ``` + ``` ```java DevRevObservabilityExtKt.addSessionProperties(DevRev.INSTANCE, HashMap properties); - ``` + ``` -To clear the session properties in scenarios such as user logout or when the session ends, use the following method: +To clear the session properties in scenarios such as user logout or when the session ends, use the following method: @@ -384,11 +594,202 @@ To clear the session properties in scenarios such as user logout or when the ses -### Timers +#### Masking sensitive data +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. + +While the auto-masking feature may be sufficient for most situations, you can manually mark/unmark additional views as sensitive. + +##### Mask +###### Using tag +> [!NOTE] +> Use Tag method only when you don't have any other tag already applied to your UI element. + +```xml +android:tag="devrev-mask" +``` + +For example: +```xml + +``` + +You can also set the tag programmatically: + + + + ```kotlin + val anyView: View = findViewById(R.id.anyView) + ``` + + + ```java + View anyView = findViewById(R.id.anyView); + anyView.setTag("devrev-mask"); + ``` + + + +###### Using API + + + + ```kotlin + DevRev.markSensitiveViews(sensitiveViews: List) + ``` + + + ```java + DevRevObservabilityExtKt.markSensitiveViews(DevRev.INSTANCE, List sensitiveViews); + ``` + + + +For example: + + + + ```kotlin + val view1 = findViewById(R.id.view1) + val view2 = findViewById(R.id.view2) + + DevRev.markSensitiveViews(listOf(view1, view2)) + ``` + + + ```java + View view1 = findViewById(R.id.view1); + View view2 = findViewById(R.id.view2); + + List sensitiveViewsList = new ArrayList<>(); + sensitiveViewsList.add(view1); + sensitiveViewsList.add(view2); + + DevRevObservabilityExtKt.markSensitiveViews(DevRev.INSTANCE, sensitiveViewsList); + ``` + + + +##### Unmask +###### Using tag +> [!NOTE] +> Use Tag method only when you don't have any other tag already applied to your UI element. + +```xml +android:tag="devrev-unmask" +``` + +For example: +```xml + +``` + +You can also set the tag programmatically: + + + + ```kotlin + val anyView: View = findViewById(R.id.anyView) + anyView.tag = "devrev-unmask" + ``` + + + ```java + View anyView = findViewById(R.id.anyView); + anyView.setTag("devrev-unmask"); + ``` + + + +###### Using API + + + + ```kotlin + DevRev.unmarkSensitiveViews(sensitiveViews: List) + ``` + + + ```java + DevRevObservabilityExtKt.unmarkSensitiveViews(DevRev.INSTANCE, List sensitiveViews); + ``` + + + +For example: + + + + ```kotlin + val view1 = findViewById(R.id.view1) + val view2 = findViewById(R.id.view2) + + DevRev.unmarkSensitiveViews(listOf(view1, view2)) + ``` + + + ```java + View view1 = findViewById(R.id.view1); + View view2 = findViewById(R.id.view2); + + List sensitiveViewsList = new ArrayList<>(); + sensitiveViewsList.add(view1); + sensitiveViewsList.add(view2); + + DevRevObservabilityExtKt.unmarkSensitiveViews(DevRev.INSTANCE, sensitiveViewsList); + ``` + + + +##### Mask jetpack compose views +If you want to mask any Jetpack Compose UI element(s) or view(s), you can apply a mask on it using a modifier. + +```kotlin +modifier = Modifier.markAsMaskedLocation("Name or ID of the Compose View") +``` + +For example: +```kotlin +TextField( + modifier = Modifier + .markAsMaskedLocation("myTextField") + .padding(horizontal = 20.dp) + .onGloballyPositioned { coordinates = it }, + value = input, + onValueChange = { input = it } +) +``` + +##### Mask webView elements +If you wish to mask any WebView element on a Web page explicitly, you can mask it by using class 'devrev-mask' + +For example: +```html + +``` + +##### Unmask webView elements +If you wish to explicitly un-mask any manually masked WebView element, you can un-mask it by using class 'devrev-unmask' + +For example: +```html + +``` + +#### Timers 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. -The mechanism utilizes balanced start and stop methods, both of which accept a timer name and an optional hashmap of properties. +The mechanism works using balanced start and stop methods that both accept a timer name and an optional dictionary of properties. To start a timer, use the following method: @@ -396,12 +797,12 @@ To start a timer, use the following method: ```kotlin DevRev.startTimer(name: String, properties: HashMap) - ``` + ``` ```java DevRevObservabilityExtKt.startTimer(DevRev.INSTANCE, String name, HashMap properties); - ``` + ``` @@ -426,26 +827,26 @@ For example: ```kotlin DevRev.startTimer("response-time", properties: {"id": "task-1337"}) - + // Perform the task that you want to measure. - + DevRev.endTimer("response-time", properties: {"id": "task-1337"}) - ``` + ``` ```java DevRevObservabilityExtKt.startTimer(DevRev.INSTANCE, "response-time", new HashMap().put("id", "task-1337")); - + // Perform the task that you want to measure. - + DevRevObservabilityExtKt.endTimer(DevRev.INSTANCE, "response-time", new HashMap().put("id", "task-1337")); ``` -### Screen tracking +#### Screen tracking -The DevRev SDK offers automatic screen tracking to help you understand how users navigate through your app. Although activities are automatically tracked, you can manually track screens or fragments using the following method: +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: @@ -475,7 +876,44 @@ For example: -## Push notifications +### Screen transition management + +The DevRev SDK allows tracking of screen transitions to understand user navigation within your app. +You can check if a screen transition is in progress and manually update the state using the following methods: + +#### Check if the screen is transitioning + + + + ```kotlin + val isTransitioning = DevRev.isInScreenTransitioning + ``` + + + ```java + boolean isTransitioning = DevRevObservabilityExtKt.isInScreenTransitioning(DevRev.INSTANCE); + ``` + + + +##### Set screen transitioning state + + + + ```kotlin + DevRev.setInScreenTransitioning(true) // start transition + DevRev.setInScreenTransitioning(false) // stop transition + ``` + + + ```java + DevRevObservabilityExtKt.setInScreenTransitioning(DevRev.INSTANCE, true) // Start transition + DevRevObservabilityExtKt.setInScreenTransitioning(DevRev.INSTANCE, false) //Stop transition + ``` + + + +### Push notifications You can configure your app to receive push notifications from the DevRev SDK. The SDK is designed to handle push notifications and execute actions based on the notification's content. @@ -485,10 +923,10 @@ To receive push notifications, you need to configure your DevRev organization by 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). -### Register for push notifications +#### Register for push notifications -Push notifications require SDK configuration and user identification, whether unverified or anonymous, to ensure delivery to the correct user. +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. The DevRev SDK offers a method to register your device for receiving push notifications. You can register for push notifications using the following method: @@ -526,17 +964,19 @@ This method will generate and return the device token. // Use the token as needed ``` -### Unregister from push notifications +#### Unregister from push notifications -If your app no longer needs to receive push notifications, you can unregister the device. +If your app no longer needs to receive push notifications, you can unregister the device. Use the following method to unregister the device: +The method requires the device identifier, which should be the same as the one used when registering the device. + ```kotlin DevRev.unregisterDevice( - context: Context, + context: Context, deviceId: String ) ``` @@ -544,17 +984,14 @@ Use the following method to unregister the device: ```java DevRev.INSTANCE.unregisterDevice( - Context context, + Context context, String deviceId ); ``` -The method requires the device identifier, which should be the same as the one used when registering the device. - -### Handle push notifications - +#### Handle push notifications 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. @@ -608,7 +1045,7 @@ For example: ```kotlin class MyFirebaseMessagingService: FirebaseMessagingService { // ... - + override fun onMessageReceived(remoteMessage: RemoteMessage) { // ... val messageData = remoteMessage.data["message"] @@ -621,7 +1058,7 @@ For example: ```java public class MyFirebaseMessagingService extends FirebaseMessagingService { // ... - + @Override public void onMessageReceived(RemoteMessage remoteMessage) { // ... @@ -635,11 +1072,11 @@ For example: ## Troubleshooting -- **Issue**: Encountering problems with DevRev SDK integration. +- **Issue**: Encountering problems with DevRev SDK integration. **Solution**: Verify the correct SDK dependency setup in the project. Ensure `mavenCentral` is accessible from the IDE, and confirm accurate detection of the selected DevRev SDK version. -- **Issue**: The `showSupport()` function or XML button is unresponsive. +- **Issue**: The `showSupport()` function or XML button is unresponsive. **Solution**: Confirm that user identification is performed before using the `showSupport()` function or XML button. -- **Issue**: Incorrect operation due to `App ID` and `secret` misconfiguration. +- **Issue**: Incorrect operation due to `App ID` and `secret` misconfiguration. **Solution**: Ensure correct functionality by double-checking that both `App ID` and `secret` values are accurately configured in your application or sample app. From 692473d0c74f8d77a4642ae90529edd80b0f6b1d Mon Sep 17 00:00:00 2001 From: Yug Date: Fri, 11 Apr 2025 12:16:36 +0530 Subject: [PATCH 2/8] Improve section in document --- fern/docs/pages/plug-sdk/android.mdx | 52 +++++++++++++--------------- 1 file changed, 25 insertions(+), 27 deletions(-) diff --git a/fern/docs/pages/plug-sdk/android.mdx b/fern/docs/pages/plug-sdk/android.mdx index b840e25b..2a0f94ee 100644 --- a/fern/docs/pages/plug-sdk/android.mdx +++ b/fern/docs/pages/plug-sdk/android.mdx @@ -51,7 +51,7 @@ After completing these steps in your `build.gradle` Groovy script, you should be -## Set up the DevRev SDK +### Set up the DevRev SDK 1. Open the DevRev web app at [https://app.devrev.ai](https://app.devrev.ai) and go to the **Settings** page. 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 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). -#### Anonymous identification +### Anonymous identification 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. @@ -176,7 +176,7 @@ The anonymous identification method allows you to create an anonymous user with -#### Unverified identification +### Unverified identification The unverified identification method identifies users with a unique identifier, but it does not verify their identity with the DevRev backend. @@ -199,7 +199,7 @@ The unverified identification method identifies users with a unique identifier, The function accepts the `DevRev.Identity` structure, with the user identifier (`userID`) as the only required property, all other properties are optional. -#### Verified identification +### Verified identification The verified identification method is used to identify the user with a unique identifier and verify the user's identity with the DevRev backend. @@ -261,7 +261,7 @@ Use this property to check whether the user has been provided to the SDK: -#### Updating the user +### Updating the user To update a user's information, use the following method: @@ -288,7 +288,7 @@ The function accepts the `DevRev.Identity` ojbect. The `userID` property cannot be updated. -#### Logout +### Logout You can perform a logout of the current user by calling the following method: @@ -327,7 +327,7 @@ Once user identification is complete, you can start using the chat (conversation -#### Creating a new conversation +### Creating a new conversation 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. @@ -461,7 +461,7 @@ For example: The DevRev SDK provides observability features to help you understand how your users are interacting with your app. -#### Opting-in or out +### Opting-in or out Session analytics features are opted-in by default, enabling them from the start. However, you can opt-out using the following method: @@ -514,7 +514,7 @@ If the user was disabled for session recording by using the stopAllMonitoring() This feature will only store a monitoring permission flag, it will not provide any UI or dialog. -#### Session recording +### Session recording You can enable session recording to capture user interactions with your app. @@ -562,7 +562,7 @@ To check if on-demand sessions are enabled, use: -#### Session properties +### Session properties 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. @@ -594,13 +594,11 @@ To clear the session properties in scenarios such as user logout or when the ses -#### Masking sensitive data +### Masking sensitive data 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. While the auto-masking feature may be sufficient for most situations, you can manually mark/unmark additional views as sensitive. -##### Mask -###### Using tag > [!NOTE] > Use Tag method only when you don't have any other tag already applied to your UI element. @@ -634,7 +632,7 @@ You can also set the tag programmatically: -###### Using API +### Using API @@ -674,8 +672,8 @@ For example: -##### Unmask -###### Using tag +### Unmask +### Using tag > [!NOTE] > Use Tag method only when you don't have any other tag already applied to your UI element. @@ -710,7 +708,7 @@ You can also set the tag programmatically: -###### Using API +### Using API @@ -750,7 +748,7 @@ For example: -##### Mask jetpack compose views +### Mask jetpack compose views If you want to mask any Jetpack Compose UI element(s) or view(s), you can apply a mask on it using a modifier. ```kotlin @@ -769,7 +767,7 @@ TextField( ) ``` -##### Mask webView elements +### Mask webView elements If you wish to mask any WebView element on a Web page explicitly, you can mask it by using class 'devrev-mask' For example: @@ -777,7 +775,7 @@ For example: ``` -##### Unmask webView elements +### Unmask webView elements If you wish to explicitly un-mask any manually masked WebView element, you can un-mask it by using class 'devrev-unmask' For example: @@ -785,7 +783,7 @@ For example: ``` -#### Timers +### Timers 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. @@ -844,7 +842,7 @@ For example: -#### Screen tracking +### Screen tracking 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: @@ -881,7 +879,7 @@ For example: The DevRev SDK allows tracking of screen transitions to understand user navigation within your app. You can check if a screen transition is in progress and manually update the state using the following methods: -#### Check if the screen is transitioning +### Check if the screen is transitioning @@ -896,7 +894,7 @@ You can check if a screen transition is in progress and manually update the stat -##### Set screen transitioning state +### Set screen transitioning state @@ -923,7 +921,7 @@ To receive push notifications, you need to configure your DevRev organization by 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). -#### Register for push notifications +### Register for push notifications 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. // Use the token as needed ``` -#### Unregister from push notifications +### Unregister from push notifications If your app no longer needs to receive push notifications, you can unregister the device. @@ -991,7 +989,7 @@ The method requires the device identifier, which should be the same as the one u -#### Handle push notifications +### Handle push notifications 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. From 8d53025e2521a204a053d4347fb345adf9dbd9ee Mon Sep 17 00:00:00 2001 From: Yug Date: Fri, 11 Apr 2025 12:17:23 +0530 Subject: [PATCH 3/8] Improve table structure. --- fern/docs/pages/plug-sdk/android.mdx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fern/docs/pages/plug-sdk/android.mdx b/fern/docs/pages/plug-sdk/android.mdx index 2a0f94ee..ee18193a 100644 --- a/fern/docs/pages/plug-sdk/android.mdx +++ b/fern/docs/pages/plug-sdk/android.mdx @@ -524,13 +524,13 @@ The session recording feature is opt-out and is enabled by default. Here are the available methods to help you control the session recording feature: -|Kotlin |Java |Action | +|Kotlin (`DevRev`) |Java (`DevRevObservabilityExtKt`) |Action | |---|---|---| -| DevRev.startRecording() | DevRevObservabilityExtKt.startRecording(DevRev.INSTANCE, context); | Starts the session recording. | -| DevRev.stopRecording() | DevRevObservabilityExtKt.stopRecording(DevRev.INSTANCE); | Stops the session recording and uploads it to the portal. | -| DevRev.pauseRecording() | DevRevObservabilityExtKt.pauseRecording(DevRev.INSTANCE); | Pauses the ongoing session recording. | -| DevRev.resumeRecording() | DevRevObservabilityExtKt.resumeRecording(DevRev.INSTANCE); | Resumes a paused session recording. | -| DevRev.processAllOnDemandSessions() | DevRevObservabilityExtKt.processAllOnDemandSessions(DevRev.INSTANECE); | Stops the ongoing user recording and uploads all offline sessions on demand, including the current one. | +| `startRecording()` | `startRecording(DevRev.INSTANCE, context);` | Starts the session recording. | +| `stopRecording()` | `stopRecording(DevRev.INSTANCE);` | Stops the session recording and uploads it to the portal. | +| `pauseRecording()` | `pauseRecording(DevRev.INSTANCE);` | Pauses the ongoing session recording. | +| `resumeRecording()` | `resumeRecording(DevRev.INSTANCE);` | Resumes a paused session recording. | +| `processAllOnDemandSessions()` | `processAllOnDemandSessions(DevRev.INSTANCE);` | Stops the ongoing user recording and uploads all offline sessions on demand, including the current one. | Using this property will return the status of the session recording: From bd7e21e8011aaa22dc5c1299b61294b3c32798c7 Mon Sep 17 00:00:00 2001 From: Yug Date: Fri, 11 Apr 2025 12:19:03 +0530 Subject: [PATCH 4/8] Improve document formatting --- fern/docs/pages/plug-sdk/android.mdx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/fern/docs/pages/plug-sdk/android.mdx b/fern/docs/pages/plug-sdk/android.mdx index ee18193a..cc8b052b 100644 --- a/fern/docs/pages/plug-sdk/android.mdx +++ b/fern/docs/pages/plug-sdk/android.mdx @@ -359,10 +359,6 @@ The support button can also accept default parameters like ```kotlin android:src="@your_drawable_here" -``` -and - -```kotlin android:backgroundTint="@your_background_color" ``` @@ -599,8 +595,9 @@ To protect sensitive data, the DevRev SDK provides an auto-masking feature that While the auto-masking feature may be sufficient for most situations, you can manually mark/unmark additional views as sensitive. -> [!NOTE] -> Use Tag method only when you don't have any other tag already applied to your UI element. +### Mask +### Using tag +Use the `Tag` method only when you don't have any other tag already applied to your UI element. ```xml android:tag="devrev-mask" @@ -877,7 +874,7 @@ For example: ### Screen transition management The DevRev SDK allows tracking of screen transitions to understand user navigation within your app. -You can check if a screen transition is in progress and manually update the state using the following methods: +You can check if a screen transition is in progress and manually update the state using the following methods. ### Check if the screen is transitioning From c10ec9668e3fb8609d7264f969217b9bb627d592 Mon Sep 17 00:00:00 2001 From: Yug Date: Thu, 17 Apr 2025 18:20:21 +0530 Subject: [PATCH 5/8] Improve setup and reduce duplication --- fern/docs/pages/plug-sdk/android.mdx | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/fern/docs/pages/plug-sdk/android.mdx b/fern/docs/pages/plug-sdk/android.mdx index cc8b052b..37f4592d 100644 --- a/fern/docs/pages/plug-sdk/android.mdx +++ b/fern/docs/pages/plug-sdk/android.mdx @@ -11,28 +11,28 @@ This section describes the process of integrating the DevRev SDK with your Andro To integrate the latest version of our SDK into your app, follow these steps: +1. Our SDK is available on Maven Central. To access it, add `mavenCentral` to your root level `build.gradle` file. + ```gradle + repositories { + mavenCentral() + } + ``` + -1. Add the following dependencies to your app's `build.gradle.kts` file to get the latest version of our SDK: +2. Add the following dependencies to your app's `build.gradle.kts` file to get the latest version of our SDK: ```kotlin dependencies { implementation("ai.devrev.sdk:devrev-sdk:") } ``` -2. Our SDK is available on Maven Central. To access it, add `mavenCentral` to your root `build.gradle.kts` file. - ```kotlin - repositories { - mavenCentral() - } - ``` -After completing these steps in your `build.gradle.kts` Kotlin script, you should be able to import and use the DevRev SDK in your Android application. -1. Add the following dependencies to your app's `build.gradle` file to get the latest version of our SDK: +2. Add the following dependencies to your app's `build.gradle` file to get the latest version of our SDK: ```groovy dependencies { @@ -40,17 +40,11 @@ After completing these steps in your `build.gradle.kts` Kotlin script, you shoul } ``` -2. Our SDK is available on Maven Central. To access it, add `mavenCentral` to your root `build.gradle` file. - ```groovy - repositories { - mavenCentral() - } - ``` -After completing these steps in your `build.gradle` Groovy script, you should be able to import and use the DevRev SDK in your Android application. - +After completing these steps in your gradle files, you should be able to import and use the DevRev SDK in your Android application. + ### Set up the DevRev SDK 1. Open the DevRev web app at [https://app.devrev.ai](https://app.devrev.ai) and go to the **Settings** page. From 0dab18a6653aa83b7655caa92dde1230b214a222 Mon Sep 17 00:00:00 2001 From: Yug Date: Thu, 17 Apr 2025 18:20:43 +0530 Subject: [PATCH 6/8] Improve table structure --- fern/docs/pages/plug-sdk/android.mdx | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/fern/docs/pages/plug-sdk/android.mdx b/fern/docs/pages/plug-sdk/android.mdx index 37f4592d..a6993444 100644 --- a/fern/docs/pages/plug-sdk/android.mdx +++ b/fern/docs/pages/plug-sdk/android.mdx @@ -514,13 +514,25 @@ The session recording feature is opt-out and is enabled by default. Here are the available methods to help you control the session recording feature: -|Kotlin (`DevRev`) |Java (`DevRevObservabilityExtKt`) |Action | -|---|---|---| -| `startRecording()` | `startRecording(DevRev.INSTANCE, context);` | Starts the session recording. | -| `stopRecording()` | `stopRecording(DevRev.INSTANCE);` | Stops the session recording and uploads it to the portal. | -| `pauseRecording()` | `pauseRecording(DevRev.INSTANCE);` | Pauses the ongoing session recording. | -| `resumeRecording()` | `resumeRecording(DevRev.INSTANCE);` | Resumes a paused session recording. | -| `processAllOnDemandSessions()` | `processAllOnDemandSessions(DevRev.INSTANCE);` | Stops the ongoing user recording and uploads all offline sessions on demand, including the current one. | +- Kotlin + +| Method | Action | +|----------------------------------------|------------------------------------------------------------------------| +| `DevRev.startRecording()` | Starts the session recording. | +| `DevRev.stopRecording()` | Stops the session recording and uploads it to the portal. | +| `DevRev.pauseRecording()` | Pauses the ongoing session recording. | +| `DevRev.resumeRecording()` | Resumes a paused session recording. | +| `DevRev.processAllOnDemandSessions()` | Stops the ongoing user recording and uploads all offline sessions on demand, including the current one. | + +- Java + +| Method | Action | +|-----------------------------------------------------------------------------|------------------------------------------------------------------------| +| `DevRevObservabilityExtKt.startRecording(DevRev.INSTANCE, context);` | Starts the session recording. | +| `DevRevObservabilityExtKt.stopRecording(DevRev.INSTANCE);` | Stops the session recording and uploads it to the portal. | +| `DevRevObservabilityExtKt.pauseRecording(DevRev.INSTANCE);` | Pauses the ongoing session recording. | +| `DevRevObservabilityExtKt.resumeRecording(DevRev.INSTANCE);` | Resumes a paused session recording. | +| `DevRevObservabilityExtKt.processAllOnDemandSessions(DevRev.INSTANCE);` | Stops the ongoing user recording and uploads all offline sessions on demand, including the current one. | Using this property will return the status of the session recording: From 9967100ef7b0ad254d888c93d8c16feab2d73564 Mon Sep 17 00:00:00 2001 From: Yug Date: Fri, 18 Apr 2025 22:40:22 +0530 Subject: [PATCH 7/8] Improve table in tabs --- fern/docs/pages/plug-sdk/android.mdx | 39 ++++++++++++++-------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/fern/docs/pages/plug-sdk/android.mdx b/fern/docs/pages/plug-sdk/android.mdx index a6993444..e8cd0dd9 100644 --- a/fern/docs/pages/plug-sdk/android.mdx +++ b/fern/docs/pages/plug-sdk/android.mdx @@ -514,25 +514,26 @@ The session recording feature is opt-out and is enabled by default. Here are the available methods to help you control the session recording feature: -- Kotlin - -| Method | Action | -|----------------------------------------|------------------------------------------------------------------------| -| `DevRev.startRecording()` | Starts the session recording. | -| `DevRev.stopRecording()` | Stops the session recording and uploads it to the portal. | -| `DevRev.pauseRecording()` | Pauses the ongoing session recording. | -| `DevRev.resumeRecording()` | Resumes a paused session recording. | -| `DevRev.processAllOnDemandSessions()` | Stops the ongoing user recording and uploads all offline sessions on demand, including the current one. | - -- Java - -| Method | Action | -|-----------------------------------------------------------------------------|------------------------------------------------------------------------| -| `DevRevObservabilityExtKt.startRecording(DevRev.INSTANCE, context);` | Starts the session recording. | -| `DevRevObservabilityExtKt.stopRecording(DevRev.INSTANCE);` | Stops the session recording and uploads it to the portal. | -| `DevRevObservabilityExtKt.pauseRecording(DevRev.INSTANCE);` | Pauses the ongoing session recording. | -| `DevRevObservabilityExtKt.resumeRecording(DevRev.INSTANCE);` | Resumes a paused session recording. | -| `DevRevObservabilityExtKt.processAllOnDemandSessions(DevRev.INSTANCE);` | Stops the ongoing user recording and uploads all offline sessions on demand, including the current one. | + + + | Method | Action | + |----------------------------------------|------------------------------------------------------------------------| + | `DevRev.startRecording()` | Starts the session recording. | + | `DevRev.stopRecording()` | Stops the session recording and uploads it to the portal. | + | `DevRev.pauseRecording()` | Pauses the ongoing session recording. | + | `DevRev.resumeRecording()` | Resumes a paused session recording. | + | `DevRev.processAllOnDemandSessions()` | Stops the ongoing user recording and uploads all offline sessions on demand, including the current one. | + + + | Method | Action | + |-----------------------------------------------------------------------------|------------------------------------------------------------------------| + | `DevRevObservabilityExtKt.startRecording(DevRev.INSTANCE, context);` | Starts the session recording. | + | `DevRevObservabilityExtKt.stopRecording(DevRev.INSTANCE);` | Stops the session recording and uploads it to the portal. | + | `DevRevObservabilityExtKt.pauseRecording(DevRev.INSTANCE);` | Pauses the ongoing session recording. | + | `DevRevObservabilityExtKt.resumeRecording(DevRev.INSTANCE);` | Resumes a paused session recording. | + | `DevRevObservabilityExtKt.processAllOnDemandSessions(DevRev.INSTANCE);` | Stops the ongoing user recording and uploads all offline sessions on demand, including the current one. | + + Using this property will return the status of the session recording: From accde969cd286daf4e4327c67931a59ff5109689 Mon Sep 17 00:00:00 2001 From: Yug Date: Fri, 25 Apr 2025 12:14:15 +0530 Subject: [PATCH 8/8] Improve analytics section --- fern/docs/pages/plug-sdk/android.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fern/docs/pages/plug-sdk/android.mdx b/fern/docs/pages/plug-sdk/android.mdx index e8cd0dd9..348b19eb 100644 --- a/fern/docs/pages/plug-sdk/android.mdx +++ b/fern/docs/pages/plug-sdk/android.mdx @@ -447,7 +447,7 @@ For example: -## Session analytics +### Session analytics The DevRev SDK provides observability features to help you understand how your users are interacting with your app.