|
1 | 1 | ## Table of contents
|
2 |
| -- [Table of contents](#table-of-contents) |
3 | 2 | - [Requirements](#requirements)
|
4 | 3 | - [Integration](#integration)
|
5 |
| - - [Step 1: App level dependencies](#step-1) |
6 |
| - - [Step 2: Project level dependencies](#step-2) |
| 4 | + - [Step 1](#step-1) |
| 5 | + - [Step 2](#step-2) |
7 | 6 | - [Setting up the DevRev SDK](#setting-up-the-devrev-sdk)
|
8 | 7 | - [Step 1: Credentials](#step-1-credentials)
|
9 | 8 | - [Step 2: Configuration](#step-2-configuration)
|
|
12 | 11 | - [Anonymous identification](#anonymous-identification)
|
13 | 12 | - [Unverified identification](#unverified-identification)
|
14 | 13 | - [Verified identification](#verified-identification)
|
| 14 | + - [Examples](#examples) |
15 | 15 | - [Updating the user](#updating-the-user)
|
16 | 16 | - [Logout](#logout)
|
17 |
| - - [Examples](#examples) |
18 | 17 | - [PLuG support chat](#plug-support-chat)
|
19 | 18 | - [Analytics](#analytics)
|
20 |
| - - [Examples](#examples-1) |
| 19 | + - [Examples](#examples-1) |
21 | 20 | - [Observability](#observability)
|
22 | 21 | - [Opting in/out](#opting-inout)
|
23 | 22 | - [Session recording](#session-recording)
|
24 | 23 | - [Session properties](#session-properties)
|
| 24 | + - [Masking sensitive data](#masking-sensitive-data) |
| 25 | + - [Mask](#mask) |
| 26 | + - [Using tag](#using-tag) |
| 27 | + - [Example](#example) |
| 28 | + - [Using API](#using-api) |
| 29 | + - [Examples](#examples-2) |
| 30 | + - [Unmask](#unmask) |
| 31 | + - [Using tag](#using-tag-1) |
| 32 | + - [Example](#example-1) |
| 33 | + - [Using API](#using-api-1) |
| 34 | + - [Examples](#examples-3) |
| 35 | + - [Mask jetpack compose views](#mask-jetpack-compose-views) |
| 36 | + - [Example](#example-2) |
| 37 | + - [Mask webView elements](#mask-webview-elements) |
| 38 | + - [Example](#example-3) |
| 39 | + - [Unmask webView elements](#unmask-webview-elements) |
| 40 | + - [Example](#example-4) |
25 | 41 | - [Timers](#timers)
|
26 |
| - - [Examples](#examples-2) |
| 42 | + - [Examples](#examples-4) |
27 | 43 | - [Screen tracking](#screen-tracking)
|
28 |
| - - [Examples](#examples-3) |
29 |
| - - [Push notifications](#push-notifications) |
30 |
| - - [Registering for push notifications](#registering-for-push-notifications) |
31 |
| - - [Unregistering from push notifications](#unregistering-from-push-notifications) |
32 |
| - - [Handling push notifications](#handling-push-notifications) |
33 |
| - - [Examples](#examples-4) |
| 44 | + - [Examples](#examples-5) |
| 45 | + - [Screen Transition Management](#screen-transition-management) |
| 46 | + - [Check if the screen is transitioning](#check-if-the-screen-is-transitioning) |
| 47 | + - [Set screen transitioning state](#set-screen-transitioning-state) |
| 48 | + - [On-Demand Session Processing](#on-demand-session-processing) |
| 49 | + - [Process all on-demand sessions](#process-all-on-demand-sessions) |
| 50 | + - [Push notifications](#push-notifications) |
| 51 | + - [Registering for push notifications](#registering-for-push-notifications) |
| 52 | + - [Unregistering from push notifications](#unregistering-from-push-notifications) |
| 53 | + - [Handling push notifications](#handling-push-notifications) |
| 54 | + - [Examples](#examples-6) |
34 | 55 | - [Sample app](#sample-app)
|
| 56 | +- [Migration Guide](#migration-guide) |
35 | 57 | - [FAQ](#faq)
|
36 | 58 |
|
37 | 59 |
|
@@ -458,6 +480,178 @@ DevRev.clearSessionProperties()
|
458 | 480 | DevRevObservabilityExtKt.clearSessionProperties(DevRev.INSTANCE);
|
459 | 481 | ```
|
460 | 482 |
|
| 483 | +### Masking sensitive data |
| 484 | +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. |
| 485 | + |
| 486 | +While the auto-masking feature may be sufficient for most situations, you can manually mark/unmark additional views as sensitive. |
| 487 | + |
| 488 | +#### Mask |
| 489 | + |
| 490 | +##### Using tag |
| 491 | +> [!NOTE] |
| 492 | +> Use Tag method only when you don't have any other tag already applied to your UI element. |
| 493 | +
|
| 494 | +```xml |
| 495 | +android:tag="devrev-mask" |
| 496 | +``` |
| 497 | + |
| 498 | +###### Example |
| 499 | +```xml |
| 500 | +<WebView |
| 501 | + android:id="@+id/webview2" |
| 502 | + android:layout_width="fill_parent" |
| 503 | + android:layout_height="200dp" |
| 504 | + android:background="@android:color/transparent" |
| 505 | + android:tag="devrev-mask"/> |
| 506 | +``` |
| 507 | + |
| 508 | +You can also set the tag programmatically: |
| 509 | +- Kotlin |
| 510 | +```kotlin |
| 511 | +val anyView: View = findViewById(R.id.anyView) |
| 512 | +anyView.tag = "devrev-mask" |
| 513 | +``` |
| 514 | + |
| 515 | +- Java |
| 516 | +```java |
| 517 | +View anyView = findViewById(R.id.anyView); |
| 518 | +anyView.setTag("devrev-mask"); |
| 519 | +``` |
| 520 | + |
| 521 | +##### Using API |
| 522 | +- Kotlin |
| 523 | +```kotlin |
| 524 | +DevRev.markSensitiveViews(sensitiveViews: List<View>) |
| 525 | +``` |
| 526 | + |
| 527 | +- Java |
| 528 | +```java |
| 529 | +DevRevObservabilityExtKt.markSensitiveViews(DevRev.INSTANCE, List<View> sensitiveViews); |
| 530 | +``` |
| 531 | + |
| 532 | +###### Examples |
| 533 | +- Kotlin |
| 534 | +```kotlin |
| 535 | +val view1 = findViewById(R.id.view1) |
| 536 | +val view2 = findViewById(R.id.view2) |
| 537 | + |
| 538 | +DevRev.markSensitiveViews(listOf(view1, view2)) |
| 539 | +``` |
| 540 | + |
| 541 | +- Java |
| 542 | +```java |
| 543 | +View view1 = findViewById(R.id.view1); |
| 544 | +View view2 = findViewById(R.id.view2); |
| 545 | + |
| 546 | +List<View> sensitiveViewsList = new ArrayList<>(); |
| 547 | +sensitiveViewsList.add(view1); |
| 548 | +sensitiveViewsList.add(view2); |
| 549 | + |
| 550 | +DevRevObservabilityExtKt.markSensitiveViews(DevRev.INSTANCE, sensitiveViewsList); |
| 551 | +``` |
| 552 | + |
| 553 | +#### Unmask |
| 554 | + |
| 555 | +##### Using tag |
| 556 | +> [!NOTE] |
| 557 | +> Use Tag method only when you don't have any other tag already applied to your UI element. |
| 558 | +
|
| 559 | +```xml |
| 560 | +android:tag="devrev-unmask" |
| 561 | +``` |
| 562 | + |
| 563 | +###### Example |
| 564 | +```xml |
| 565 | +<WebView |
| 566 | + android:id="@+id/webview2" |
| 567 | + android:layout_width="fill_parent" |
| 568 | + android:layout_height="200dp" |
| 569 | + android:background="@android:color/transparent" |
| 570 | + android:tag="devrev-unmask"/> |
| 571 | +``` |
| 572 | + |
| 573 | +You can also set the tag programmatically: |
| 574 | +- Kotlin |
| 575 | +```kotlin |
| 576 | +val anyView: View = findViewById(R.id.anyView) |
| 577 | +anyView.tag = "devrev-unmask" |
| 578 | +``` |
| 579 | + |
| 580 | +- Java |
| 581 | +```java |
| 582 | +View anyView = findViewById(R.id.anyView); |
| 583 | +anyView.setTag("devrev-unmask"); |
| 584 | +``` |
| 585 | + |
| 586 | +##### Using API |
| 587 | +- Kotlin |
| 588 | +```kotlin |
| 589 | +DevRev.unmarkSensitiveViews(sensitiveViews: List<View>) |
| 590 | +``` |
| 591 | + |
| 592 | +- Java |
| 593 | +```java |
| 594 | +DevRevObservabilityExtKt.unmarkSensitiveViews(DevRev.INSTANCE, List<View> sensitiveViews); |
| 595 | +``` |
| 596 | + |
| 597 | +###### Examples |
| 598 | +- Kotlin |
| 599 | +```kotlin |
| 600 | +val view1 = findViewById(R.id.view1) |
| 601 | +val view2 = findViewById(R.id.view2) |
| 602 | + |
| 603 | +DevRev.unmarkSensitiveViews(listOf(view1, view2)) |
| 604 | +``` |
| 605 | + |
| 606 | +- Java |
| 607 | +```java |
| 608 | +View view1 = findViewById(R.id.view1); |
| 609 | +View view2 = findViewById(R.id.view2); |
| 610 | + |
| 611 | +List<View> sensitiveViewsList = new ArrayList<>(); |
| 612 | +sensitiveViewsList.add(view1); |
| 613 | +sensitiveViewsList.add(view2); |
| 614 | + |
| 615 | +DevRevObservabilityExtKt.unmarkSensitiveViews(DevRev.INSTANCE, sensitiveViewsList); |
| 616 | +``` |
| 617 | + |
| 618 | +#### Mask jetpack compose views |
| 619 | +If you want to mask any Jetpack Compose UI element(s) or view(s), you can apply a mask on it using a modifier. |
| 620 | + |
| 621 | +```kotlin |
| 622 | +modifier = Modifier.markAsMaskedLocation("Name or ID of the Compose View") |
| 623 | +``` |
| 624 | + |
| 625 | +###### Example |
| 626 | +```kotlin |
| 627 | +TextField( |
| 628 | + modifier = Modifier |
| 629 | + .markAsMaskedLocation("myTextField") |
| 630 | + .padding(horizontal = 20.dp) |
| 631 | + .onGloballyPositioned { coordinates = it }, |
| 632 | + value = input, |
| 633 | + onValueChange = { input = it } |
| 634 | +) |
| 635 | +``` |
| 636 | + |
| 637 | +#### Mask webView elements |
| 638 | + |
| 639 | +If you wish to mask any WebView element on a Web page explicitly, you can mask it by using class 'devrev-mask' |
| 640 | + |
| 641 | +###### Example |
| 642 | +```html |
| 643 | +<label class="ue-mask">OTP: 12345</label> |
| 644 | +``` |
| 645 | + |
| 646 | +#### Unmask webView elements |
| 647 | + |
| 648 | +If you wish to explicitly un-mask any manually masked WebView element, you can un-mask it by using class 'devrev-unmask' |
| 649 | + |
| 650 | +###### Example |
| 651 | +```html |
| 652 | +<input type="text" placeholder="Enter Username" name="username" required class="devrev-unmask"> |
| 653 | +``` |
| 654 | + |
461 | 655 | ### Timers
|
462 | 656 | As part of the observability features, the DevRev SDK provides a timer mechanism to help you measure the time spent on a specific task. Events such as response time, loading time, or any other time-based event can be measured using the timer.
|
463 | 657 |
|
@@ -577,8 +771,7 @@ You can configure your app to receive push notifications from the DevRev SDK. Th
|
577 | 771 | The DevRev backend sends push notifications to your app to notify users about new messages in the PLuG support chat. In the future, the push notification support will be expanded with additional features.
|
578 | 772 |
|
579 | 773 | > [!CAUTION]
|
580 |
| -> TBD @Ribhu has to provide the integration guide for push notifications. |
581 |
| -In order to receive push notifications, you need to configure your DevRev organization by following the [Push Notifications integration guide](#). |
| 774 | +> In order to receive push notifications, you need to configure your DevRev organization by following the [Push Notifications integration guide](#). |
582 | 775 |
|
583 | 776 | You need to make sure that your Android app is configured to receive push notifications. You can follow the [Firebase documentation](https://firebase.google.com/docs/cloud-messaging/android/client) to set up your app to receive push notifications.
|
584 | 777 |
|
@@ -708,6 +901,10 @@ The sample app showcasing both the functionality and the XML implementation has
|
708 | 901 | > [!NOTE]
|
709 | 902 | > The sample is yet to be updated with the latest version of the SDK. Stay Tuned!
|
710 | 903 |
|
| 904 | +# Migration Guide |
| 905 | + |
| 906 | +If you are migrating from the legacy UserExperior SDK to the new DevRev SDK, please refer to the [Migration Guide](./MIGRATION.md) for detailed instructions and feature equivalence. |
| 907 | + |
711 | 908 | # FAQ
|
712 | 909 | In case of any issues with the integration of the DevRev SDK, please verify that the dependency is correctly set in the project. In addition, please make sure that `mavenCentral` is reachable from the IDE and that the DevRev PluG SDK version of choice was correctly detected.
|
713 | 910 |
|
|
0 commit comments