Skip to content

ISS-163750: Update the Android SDK guide #204

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

Closed
wants to merge 8 commits into from

Conversation

Yug2801
Copy link

@Yug2801 Yug2801 commented Apr 10, 2025

This PR updates the Android SDK guide.

@Yug2801 Yug2801 requested review from bojan and bc-devrev April 10, 2025 10:35
@Yug2801 Yug2801 self-assigned this Apr 10, 2025
@Yug2801 Yug2801 requested a review from a team as a code owner April 10, 2025 10:35
Copy link
Contributor

github-actions bot commented Apr 10, 2025

🌟 EkLine Reviewer

Hello! I’m here to help improve your docs. I’ve reviewed your pull request, and left in-line suggestions for quick fixes. For details, visit the Analytics Page.

For questions or feedback, please email [email protected].

Copy link
Contributor

Copy link
Contributor

@bc-devrev bc-devrev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to go ahead and approve but I strongly recommend that you improve the organization of the page.

@@ -53,8 +53,12 @@ After completing these steps in your `build.gradle` Groovy script, you should be

## Set up the DevRev SDK
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this relate to the "Quickstart guide" section?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bc-devrev we'll be splitting the documentation for each platform to multiple child pages: https://app.devrev.ai/devrev/works/ISS-158597.
This PR is only bringing the latest changes from the source readme.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bc-devrev we have prepared the restructured documentation PR #223. Can we approve this one?

@@ -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).
</Callout>

### Anonymous identification
#### Anonymous identification
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Getting to H4 is an indication that there's too much content for a single page.

@@ -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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommend combining these lines into a single codeblock rather than two with "and" between.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As they are separate properties, I'd leave them as is.

@@ -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 |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This table doesn't fit on the page. Saving space is why DevRevObservabilityExtKt wasn't repeated in every row.

image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather split them in two tables, one for Kotlin and one for Java. We should mention the full signature including the module name. @Yug2801 @bc-devrev

|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. |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Surrounding the methods with backticks as they should would prevent the EkLine comment about periods.

Suggested change
| DevRev.startRecording() | DevRevObservabilityExtKt.startRecording(DevRev.INSTANCE, context); | Starts the session recording. |
| `DevRev.startRecording()` | `DevRevObservabilityExtKt.startRecording(DevRev.INSTANCE, context);` | Starts the session recording. |

Comment on lines 602 to 603
##### Mask
###### Using tag
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This nesting is way too deep. Seems like it would be better to have the session analytics information on a separate page.

Comment on lines 604 to 605
> [!NOTE]
> Use Tag method only when you don't have any other tag already applied to your UI element.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> [!NOTE]
> Use Tag method only when you don't have any other tag already applied to your UI element.
<Note>Use the `Tag` method only when you don't have any other tag already applied to your UI element.</Note>

### 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:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

@@ -635,11 +1072,11 @@ For example:

## Troubleshooting

- **Issue**: Encountering problems with DevRev SDK integration.
- **Issue**: Encountering problems with DevRev SDK integration.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be more specific. What kind of "problems"? What does the developer or user see to indicate a problem?

Suggested change
- **Issue**: Encountering problems with DevRev SDK integration.
- **Issue**: Encountering problems with DevRev SDK integration.

Copy link
Contributor

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [EkLine] reported by reviewdog 🐶

Where possible, do not structure sentences in future tense. Use present tense instead. (EK00005)

Suggested change
The SDK will be ready for use once you execute the following configuration method.
The SDK is ready for use once you execute the following configuration method.


### 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [EkLine] reported by reviewdog 🐶

Where possible, do not structure sentences in future tense. Use present tense instead. (EK00005)

Suggested change
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.
You have the ability to create a new conversation from within your app. The method shows the support chat screen and creates a new conversation at the same time.

Copy link
Contributor

@Yug2801 Yug2801 requested a review from bc-devrev April 17, 2025 12:54
</Tab>
</Tabs>

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [EkLine] reported by reviewdog 🐶

Where possible, do not structure sentences in future tense. Use present tense instead. (EK00005)

Suggested change
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.
The user is logged out by clearing their credentials, as well as unregistering the device from receiving push notifications, and stopping the session recording.

</Tab>
</Tabs>

Using this property will return the status of the session recording:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [EkLine] reported by reviewdog 🐶

Where possible, do not structure sentences in future tense. Use present tense instead. (EK00005)

Suggested change
Using this property will return the status of the session recording:
Using this property returns the status of the session recording:

DevRevObservabilityExtKt.endTimer(DevRev.INSTANCE, "response-time", new HashMap<String, String>().put("id", "task-1337"));
```
</Tab>
</Tabs>

### 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:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [EkLine] reported by reviewdog 🐶

Consider using 'go' instead of 'navigate'. (EK25033)

Suggested change
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:
The DevRev SDK offers automatic screen tracking to help you understand how users go through your app. Although view controllers are automatically tracked, you can manually track screens using the following method:

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Navigate is the correct verb here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [EkLine] reported by reviewdog 🐶

Where possible, do not structure sentences in future tense. Use present tense instead. (EK00005)

This method will generate and return the device token.

Copy link
Contributor

</Tab>
</Tabs>

If the user was disabled for session recording by using the stopAllMonitoring() method, you can use this method to enable recording at runtime.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [EkLine] reported by reviewdog 🐶

Don't use language (such as 'disabled ') that defines people by their disability. (EK00030)

Suggested change
If the user was disabled for session recording by using the stopAllMonitoring() method, you can use this method to enable recording at runtime.
If session recording was turned off for the user by using the stopAllMonitoring() method, you can use this method to enable recording at runtime.


<Callout intent="note">
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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [EkLine] reported by reviewdog 🐶

Suggestions:

    Where possible, do not structure sentences in future tense. Use present tense instead. (EK00005)

Suggested change
This feature will only store a monitoring permission flag, it will not provide any UI or dialog.
This feature only stores a monitoring permission flag, it does not provide any UI or dialog.

Copy link
Contributor

@@ -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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As they are separate properties, I'd leave them as is.

> Use Tag method only when you don't have any other tag already applied to your UI element.
### Mask
### Using tag
<Note>Use the `Tag` method only when you don't have any other tag already applied to your UI element.</Note>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zeeshan-devrev @rohan-devrev can we check if the method is actually uppercased?

DevRevObservabilityExtKt.endTimer(DevRev.INSTANCE, "response-time", new HashMap<String, String>().put("id", "task-1337"));
```
</Tab>
</Tabs>

### 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:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Navigate is the correct verb here.

@bc-devrev
Copy link
Contributor

@Yug2801 please either complete this PR or close it.

@Yug2801
Copy link
Author

Yug2801 commented Jun 4, 2025

Yes, I am closing this PR as all the comments here have been resolved in the ‘Modularize the Mobile SDK Documentation’ PR.

@Yug2801 Yug2801 closed this Jun 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants