Skip to content

Commit 8630688

Browse files
ISS-160289: Update the React Native SDK guide (#195)
* Update the react native SDK guide. * Fix the grammar * Fix some phrasings and typos * Update react-native.mdx Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 52ec78d commit 8630688

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

fern/docs/pages/plug-sdk/react-native.mdx

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ On iOS, if you haven't previously identified the user, the DevRev SDK will autom
3333
</Callout>
3434

3535
<Callout intent="note">
36-
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).
36+
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 used. For more information, refer to [Object customization](https://devrev.ai/docs/product/object-customization).
3737
</Callout>
3838

3939
You can select from the following methods to identify users within your application:
@@ -71,7 +71,7 @@ The `userID` property cannot be updated.
7171
Once user identification is complete, you can start using the chat (conversations) dialog supported by our DevRev SDK. The support chat feature can be shown as a modal screen from the top-most screen. 
7272

7373
<Callout intent="note">
74-
This functionality requires the SDK to be configured and the user to be identified, whether they are unverified or anonymous.
74+
This feature requires the SDK to be configured and the user to be identified, whether they are unverified or anonymous.
7575
</Callout>
7676

7777
To show the support chat screen in your app, you can use the following method:
@@ -90,7 +90,7 @@ DevRev.createSupportConversation()
9090

9191
### In-app link handling
9292

93-
In some instances, links opened from the support chat are displayed within the app rather than in a browser. You can manage whether the chat modal should close after a link is opened by using the following method:
93+
In certain cases, tapping links in the support chat opens them in the app instead of a browser. You can control whether the chat modal screen is dismissed after the link is opened by calling the following method:
9494

9595
```typescript
9696
DevRev.setShouldDismissModalsOnOpenLink(value: boolean)
@@ -101,7 +101,7 @@ Setting this flag to `true` applies the system's default behavior for opening li
101101
### In-app link callback
102102

103103
<Callout intent="note">
104-
This functionality is for Android only.
104+
This feature is for Android only.
105105
</Callout>
106106

107107
For scenarios where custom handling is needed, links from the support chat can be captured with the following method:
@@ -116,12 +116,12 @@ If a custom handler is not defined, all external and in-app links from the suppo
116116

117117
## Analytics
118118

119-
The DevRev SDK allows you to send custom analytic events by using a properties map. You can track these events using the following function:
120-
121119
<Callout intent="note">
122-
This functionality requires the SDK to be configured and the user to be identified, whether they are unverified or anonymous.
120+
This feature requires the SDK to be configured and the user to be identified, whether they are unverified or anonymous.
123121
</Callout>
124122

123+
The DevRev SDK allows you to send custom analytic events by using a properties map. You can track these events using the following function:
124+
125125
```typescript
126126
DevRev.trackEvent(name: string, properties?: Map<string, string>)
127127
```
@@ -146,7 +146,7 @@ DevRev.resumeAllMonitoring()
146146

147147
### Session recording
148148

149-
You can enable session recording to capture user interactions with your app.
149+
You can enable session recording to record user interactions with your app.
150150

151151
<Callout intent="note">
152152
The session recording feature is opt-out and is enabled by default.
@@ -156,10 +156,11 @@ The session recording feature includes the following methods to control the reco
156156

157157
| Method | Action |
158158
|--------------------------------------------------------------------|-----------------------------------------------------------|
159-
|`DevRev.startRecording()` | Starts the session recording. |
160-
|`DevRev.stopRecording()` | Ends the session recording and uploads it to the portal. |
161-
|`DevRev.pauseRecording()` | Pauses the ongoing session recording. |
162-
|`DevRev.resumeRecording()` | Resumes a paused session recording. |
159+
|`DevRev.startRecording()` | Start the session recording. |
160+
|`DevRev.stopRecording()` | Stop the session recording and upload it to the portal. |
161+
|`DevRev.pauseRecording()` | Pause the ongoing session recording. |
162+
|`DevRev.resumeRecording()` | Resume a paused session recording. |
163+
|`DevRev.processAllOnDemandSessions()` | Stop the ongoing session recording and upload all offline sessions on demand, including the current one.|
163164

164165
### Session properties
165166

@@ -195,7 +196,7 @@ DevRev.unmarkSensitiveViews(tags: any[])
195196

196197
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.
197198

198-
The mechanism utilizes balanced start and stop methods, both of which accept a timer name and an optional dictionary of properties.
199+
The mechanism uses balanced start and stop methods, both of which accept a timer name and an optional dictionary of properties.
199200

200201
To start a timer, use the following method:
201202

@@ -219,9 +220,9 @@ DevRev.trackScreen(name: string)
219220

220221
## Push notifications
221222

222-
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.
223+
You can configure your app to receive push notifications from the DevRev SDK. The SDK is able to handle push notifications and execute actions based on the notification's content.
223224

224-
The DevRev backend sends push notifications to your app to alert users about new messages in the PLuG support chat.
225+
The DevRev backend sends push notifications to your app to notify users about new messages in the PLuG support chat.
225226

226227
### Configuration
227228

@@ -230,7 +231,7 @@ To receive push notifications, you need to configure your DevRev organization by
230231
### Register for push notifications
231232

232233
<Callout intent="note">
233-
Push notifications require SDK configuration and user identification, whether unverified or anonymous, to ensure delivery to the correct user.
234+
To ensure delivery to the correct user, push notifications require that the SDK has been configured and the user has been identified.
234235
</Callout>
235236

236237
The DevRev SDK offers a method to register your device for receiving push notifications. You can register for push notifications using the following method:
@@ -239,7 +240,7 @@ The DevRev SDK offers a method to register your device for receiving push notifi
239240
DevRevSDK.registerDeviceToken(deviceToken: string, deviceID: string)
240241
```
241242

242-
On Android devices, the `deviceToken` should be the Firebase Cloud Messaging (FCM) token value, while on iOS devices, it should be the Apple Push Notification Service (APNS) token.
243+
On Android devices, the `deviceToken` must be the Firebase Cloud Messaging (FCM) token value. On iOS devices, it must be the Apple Push Notification Service (APNs) token.
243244

244245
### Unregister from push notifications
245246

@@ -297,4 +298,3 @@ DevRevSDK.processPushNotification(JSON.stringify(payload));
297298
## License
298299

299300
Apache 2.0
300-

0 commit comments

Comments
 (0)