Skip to content

Commit 58379a3

Browse files
committed
Release v0.9.7
1 parent 1b1f23e commit 58379a3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1580
-73
lines changed

CHANGELOG.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22

33
All notable changes to this project will be documented in this file.
44

5-
## Added
5+
0.9.7
6+
# Added
7+
- Added support for tracking analytics events.
68

9+
# Changed
10+
- Updated the initial configuration method.
11+
- Updated support widget to the latest version.
12+
13+
# Deprecated
14+
- Removed the organization slug (`organizationSlug`) parameter from the configuration method.
15+
16+
For installation instructions, consult the [documentation](README.md).
717
## Fixed
18+

README.md

Lines changed: 49 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11

22
## Table of contents
3-
- [Prerequisites](#prerequisites)
4-
- [Installation](#installation)
5-
- [Initialize DevRev SDK](#initialize-devrev-sdk)
6-
- [Usage](#usage)
7-
- [Sample app compile and run guide](#sample-app-compile-and-run-guide)
8-
- [Configuration](#configuration)
3+
- [Requirements](#requirements)
4+
- [Setup](#setup)
5+
- [Initialize DevRev SDK](#setting-up-the-devrev-sdk)
6+
- [Features](#features)
7+
- [Sample app](#sample-app)
98
- [Troubleshooting](#troubleshooting)
109

1110

@@ -23,48 +22,57 @@
2322
Add the following dependencies to your app's `build.gradle.kts` file to get the latest version of our SDK:
2423
```kotlin
2524
dependencies {
26-
implementation("ai.devrev.sdk:plug:0.9.6")
25+
implementation("ai.devrev.sdk:core:<version>")
2726
}
2827
```
2928

3029
## Step 2
31-
Since our SDK is hosted on Maven Central, all you need to do is add `mavenCentral()` to your repositories in root's `build.gradle.kts` file.
32-
30+
Our SDK is hosted on mavenCentral, so to gain access to it, just include the mavenCentral to your root's `build.gradle.kts` file.
3331
```kotlin
3432
repositories {
3533
mavenCentral()
3634
}
3735
```
36+
After this step, it should be possible to import and use the DevRev SDK in your Android application.
3837

39-
Now you should be able to import and use the DevRev SDK.
38+
After adding the lines about in your `build.gradle.kts` script you should be able to import and use the DevRev SDK.
4039

4140

4241
# Setting up the DevRev SDK
4342
## Step 1: Credentials
44-
In order to use the DevRev SDK you need the required credentials that can be found on the DevRev web app.
45-
Open the Settings screen (gear icon), and then go to PLuG Setup under Support.
43+
In order to use the DevRev SDK you need to provide credentials that can be found in the DevRev web app settings pages.
44+
Open the Settings screen (gear icon), and then go to PLuG Tokens under Support.
4645

47-
![Settings Icon](docs/screenshots/screenshot-support-settings.png)
46+
![Settings Icon](docs/screenshots/screenshot-support-settings-plug-tokens.png)
4847

49-
Under the App ID and Secret section you can create the credentials for use in the SDK.
48+
Under the App ID and Secret section you can create the credentials for use in the SDK. Store the **App ID** and
49+
**Secret** as this will be used in the SDK configuration.
5050

5151
![Tokens](docs/screenshots/screenshot-creating-credentials.png)
5252

53+
Then you will need to obtain the **PLuG App ID** (referred to as `supportID` in the code) by going to the **PLuG Settings** page.
54+
55+
![Settings](docs/screenshots/screenshot-support-settings-plug-tokens.png)
56+
57+
![Settings](docs/screenshots/screenshot-support-settings-id.png)
58+
59+
60+
5361
## Step 2: Initialization
5462
Once you have the credentials, you can configure the DevRev SDK in your app.
5563

5664
To configure the SDK, you need to call the following method inside your `Application` class:
5765

5866
```kotlin
5967
fun DevRev.configure(
60-
context: Context,
61-
appID: String,
62-
secret: String,
63-
organizationSlug: String
68+
context: Context,
69+
appID: String,
70+
secret: String,
71+
supportId: String
6472
)
6573
```
6674

67-
In case you do not have a custom `Application` class, you have to extend one like this:
75+
In case you do not have a custom `Application` class, you have to extend one like in the following example:
6876

6977
```kotlin
7078
import ai.devrev.sdk.DevRev
@@ -77,37 +85,38 @@ class FooApplication : Application() {
7785
context = this,
7886
appId = "<APP_ID>",
7987
secret = "<SECRET>",
80-
organizationSlug = "<ORG_SLUG>"
88+
supportId = "<SUPPORT_ID>",
8189
)
8290
}
8391
}
8492
```
8593
In the `onCreate` method in your `Application`, you need to configure the DevRev SDK with the required parameters. Here you need to use the credentials that we have created before.
8694

87-
Moreover, the custom application should be defined in `AndroidManifest.xml` like this:
95+
Moreover, the custom application should be defined in `AndroidManifest.xml` like in the following example:
8896
```xml
8997
<application
9098
android:name=".FooApplication">
9199
</application>
92100
```
93101

94102
# Features
95-
Before you can use the PLuG support feature, you need to `identify` the user like this:
103+
Before start using the PLuG chat feature, user identification is required. There are many arguments mobile applications can submit in order to identify the user. The following example takes the most simplistic approach and provides a bare minimum of arguments required for successful user identification:
96104
```kotlin
97105
DevRev.identify(
98106
userIdentification = UserIdentification(userId = "[email protected]")
99107
)
100108
```
109+
Please read PluG API documentation to learn more about user identification options.
101110

102-
Now you can use the support chat feature.
111+
After completing user identification, it is possible to start using the chat (conversations) dialog supported by our DevRev SDK.
103112

104-
To open the support chat, you can call the function
113+
In order to open the chat dialog, application should use `showSupport` API, as demonstrated in the following example:
105114

106115
```kotlin
107116
DevRev.showSupport(context: Context)
108117
```
109118

110-
Or you can include it in the view with the following code in your XML layout:
119+
Mobile PluG SDK also exposes the support button, which can be added to your application. Including it in the current screen requires adding the following code in your XML layout:
111120
```xml
112121
<ai.devrev.sdk.plug.view.PlugFloatingActionButton
113122
android:id="@+id/plug_fab"
@@ -117,23 +126,29 @@ Or you can include it in the view with the following code in your XML layout:
117126
app:layout_constraintBottom_toBottomOf="parent"
118127
app:layout_constraintEnd_toEndOf="parent" />
119128
```
120-
The button can also accept default parameters like
121-
`android:src="@your_drawable_here"`
122-
and
123-
`android:backgroundTint="@your_background_color"`
129+
The support button can also accept default parameters like
130+
```kotlin
131+
android:src="@your_drawable_here"
132+
```
133+
and/or
134+
```kotlin
135+
android:backgroundTint="@your_background_color"
136+
```
124137
so that you can customize it to your own needs.
125-
The button will show up on your screen and by default, it should look like this:
138+
The button will show up on your screen. The button will show up on your screen. Please check the following screenshot to visualize how the support button is expected to look in our application:
126139

127140
<img src="docs/screenshots/screenshot-sample-identifying-the-user.png" width="220"/>
128141

129-
You should now be able to run the app and use all the functionalities of the PLuG Support chat. The button click will navigate to the support chat.
142+
At this point, it should be possible to run the app and use all the functionalities of the DevRev PLuG SDK. Pressing the support button would navigate user to the chat.
130143

131144
<img src="docs/screenshots/screenshot-sample-support-view.png" width="220"/>
132145

133146
# Sample app
134-
A sample app with use cases for both function and XML implementation has been provided as part of this repository.
147+
Please note that all examples presented in this document are generated using DevRev SDK sample app. The sample app with examples for both function and XML implementation has been provided as part of this repository. Users are kindly encouraged to run the sample app before integrating PluG SDK in the destination application.
135148

136149
# Troubleshooting
137-
In case you are having trouble with importing the DevRev SDK, check if you have the correct dependency, as well as Github maven URL in your root's project.
150+
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.
151+
152+
In case the `showSupport()` function or XML button are not responding, make sure the user has been identified beforehand.
138153

139-
If the `showSupport()` function or XML button are not responding, make sure the user has been identified beforehand or if configuration accepted the right parameters for `appID` and `secret`.
154+
To ensure correct operation, correctly setting App ID and secrete is of paramount importance. Please double-check that both values are correctly configured in your application or sample app.

docs/html/core/ai.devrev.sdk.model/-organization-info/-organization-info.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
</a>
4141
</div>
4242
<div>
43-
0.9.6 </div>
43+
0.9.7 </div>
4444
<div class="pull-right d-flex">
4545
<button id="theme-toggle-button"><span id="theme-toggle"></span></button>
4646
<div id="searchBar"></div>

docs/html/core/ai.devrev.sdk.model/-organization-info/display-name.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
</a>
4141
</div>
4242
<div>
43-
0.9.6 </div>
43+
0.9.7 </div>
4444
<div class="pull-right d-flex">
4545
<button id="theme-toggle-button"><span id="theme-toggle"></span></button>
4646
<div id="searchBar"></div>

docs/html/core/ai.devrev.sdk.model/-organization-info/domain.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
</a>
4141
</div>
4242
<div>
43-
0.9.6 </div>
43+
0.9.7 </div>
4444
<div class="pull-right d-flex">
4545
<button id="theme-toggle-button"><span id="theme-toggle"></span></button>
4646
<div id="searchBar"></div>

docs/html/core/ai.devrev.sdk.model/-organization-info/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
</a>
4141
</div>
4242
<div>
43-
0.9.6 </div>
43+
0.9.7 </div>
4444
<div class="pull-right d-flex">
4545
<button id="theme-toggle-button"><span id="theme-toggle"></span></button>
4646
<div id="searchBar"></div>

docs/html/core/ai.devrev.sdk.model/-user-identification/-user-identification.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
</a>
4141
</div>
4242
<div>
43-
0.9.6 </div>
43+
0.9.7 </div>
4444
<div class="pull-right d-flex">
4545
<button id="theme-toggle-button"><span id="theme-toggle"></span></button>
4646
<div id="searchBar"></div>

docs/html/core/ai.devrev.sdk.model/-user-identification/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
</a>
4141
</div>
4242
<div>
43-
0.9.6 </div>
43+
0.9.7 </div>
4444
<div class="pull-right d-flex">
4545
<button id="theme-toggle-button"><span id="theme-toggle"></span></button>
4646
<div id="searchBar"></div>

docs/html/core/ai.devrev.sdk.model/-user-identification/organization-id.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
</a>
4141
</div>
4242
<div>
43-
0.9.6 </div>
43+
0.9.7 </div>
4444
<div class="pull-right d-flex">
4545
<button id="theme-toggle-button"><span id="theme-toggle"></span></button>
4646
<div id="searchBar"></div>

docs/html/core/ai.devrev.sdk.model/-user-identification/organization-info.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
</a>
4141
</div>
4242
<div>
43-
0.9.6 </div>
43+
0.9.7 </div>
4444
<div class="pull-right d-flex">
4545
<button id="theme-toggle-button"><span id="theme-toggle"></span></button>
4646
<div id="searchBar"></div>

docs/html/core/ai.devrev.sdk.model/-user-identification/user-id.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
</a>
4141
</div>
4242
<div>
43-
0.9.6 </div>
43+
0.9.7 </div>
4444
<div class="pull-right d-flex">
4545
<button id="theme-toggle-button"><span id="theme-toggle"></span></button>
4646
<div id="searchBar"></div>

docs/html/core/ai.devrev.sdk.model/-user-identification/user-info.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
</a>
4141
</div>
4242
<div>
43-
0.9.6 </div>
43+
0.9.7 </div>
4444
<div class="pull-right d-flex">
4545
<button id="theme-toggle-button"><span id="theme-toggle"></span></button>
4646
<div id="searchBar"></div>

docs/html/core/ai.devrev.sdk.model/-user-info/-user-info.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
</a>
4141
</div>
4242
<div>
43-
0.9.6 </div>
43+
0.9.7 </div>
4444
<div class="pull-right d-flex">
4545
<button id="theme-toggle-button"><span id="theme-toggle"></span></button>
4646
<div id="searchBar"></div>

docs/html/core/ai.devrev.sdk.model/-user-info/display-name.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
</a>
4141
</div>
4242
<div>
43-
0.9.6 </div>
43+
0.9.7 </div>
4444
<div class="pull-right d-flex">
4545
<button id="theme-toggle-button"><span id="theme-toggle"></span></button>
4646
<div id="searchBar"></div>

docs/html/core/ai.devrev.sdk.model/-user-info/email.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
</a>
4141
</div>
4242
<div>
43-
0.9.6 </div>
43+
0.9.7 </div>
4444
<div class="pull-right d-flex">
4545
<button id="theme-toggle-button"><span id="theme-toggle"></span></button>
4646
<div id="searchBar"></div>

docs/html/core/ai.devrev.sdk.model/-user-info/full-name.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
</a>
4141
</div>
4242
<div>
43-
0.9.6 </div>
43+
0.9.7 </div>
4444
<div class="pull-right d-flex">
4545
<button id="theme-toggle-button"><span id="theme-toggle"></span></button>
4646
<div id="searchBar"></div>

docs/html/core/ai.devrev.sdk.model/-user-info/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
</a>
4141
</div>
4242
<div>
43-
0.9.6 </div>
43+
0.9.7 </div>
4444
<div class="pull-right d-flex">
4545
<button id="theme-toggle-button"><span id="theme-toggle"></span></button>
4646
<div id="searchBar"></div>

docs/html/core/ai.devrev.sdk.model/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
</a>
4141
</div>
4242
<div>
43-
0.9.6 </div>
43+
0.9.7 </div>
4444
<div class="pull-right d-flex">
4545
<button id="theme-toggle-button"><span id="theme-toggle"></span></button>
4646
<div id="searchBar"></div>

0 commit comments

Comments
 (0)