Skip to content

Commit

Permalink
SDK X 10.4.0 Updates (#148)
Browse files Browse the repository at this point in the history
* iOS - Add new identity users page

* iOS - Update delegates page

* iOS - Update tracking page

* iOS - Add note about identity user in existing user page

* iOS - Remove QBImagePicker from license page

* iOS - Add 10.4.0 release notes

* iOS - Add iOS 18 related troubleshooting

* iOS - Add more details for anon id user

* Add few more details for users and attrs

* iOS - Add beta note for identity feature

Add key value failure cases for attrs APIs

* iOS - Add QBImagePicker to license page

- Add note for QBImagePicker to be available for SDK X 10.3.x versions only

* android:Add empty page for Identity User Management

* android - Update getting-started page for Android 15 changes

* android - Add details in Identity User Management page

* android - Add delegate changes for new identity system

* android - Updated trackings page for new identity support changes

* android - Add note for new identity system in old user system page

* android - Add release notes for Android 10.4.0

* android - Add note for enableLogging chagnes

* Update min supported iOS version

* Fix incorrect group id and values for iOS langauges

* Fix incorrect group id and values for iOS langauges

* Identity partity check for iOS vs Android content

* Fix typo in code

* Add anouncement to dev docs

* Update dsym path

* [iOS] Add Impact Analysis for 10.4.0

* Update docs/sdkx_android/delegates.mdx

Co-authored-by: helpshift-ps <50576667+helpshift-ps@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: helpshift-ps <50576667+helpshift-ps@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: helpshift-ps <50576667+helpshift-ps@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: helpshift-ps <50576667+helpshift-ps@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: helpshift-ps <50576667+helpshift-ps@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: helpshift-ps <50576667+helpshift-ps@users.noreply.github.com>

* Fix comments on iOS docs

* android - Add impact analysis for 10.4.0

* android - Remove duplicate entry in release-notes

* Made review changes

* Apply suggestions from code review

---------

Co-authored-by: hs-chetan-urkude <chetan.urkude@helpshift.com>
Co-authored-by: joyson.ps <joyson.ps@helpshift.com>
Co-authored-by: arif.ashraf <arif.ashraf@helpshift.com>
Co-authored-by: hs-chetan-urkude <134036322+hs-chetan-urkude@users.noreply.github.com>
Co-authored-by: helpshift-ps <50576667+helpshift-ps@users.noreply.github.com>
  • Loading branch information
6 people authored Nov 27, 2024
1 parent 065ad22 commit b925363
Show file tree
Hide file tree
Showing 20 changed files with 1,189 additions and 109 deletions.
156 changes: 132 additions & 24 deletions docs/sdkx_android/delegates.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
sidebar_position: 90
title: Helpshift Delegates
description: "The Helpshift SDK provides delegate callbacks to help app developers track a user's activities within the help section."
description: "The Helpshift delegate provides callbacks/events to help app developers track global events generated by the SDK."
---

import {
Expand Down Expand Up @@ -39,7 +39,8 @@ You can set `HelpshiftEventsListener` by calling the `Helpshift.setHelpshiftEven

<Admonition type="info" title="Note">

Events invoked before setting `Helpshift.setHelpshiftEventsListener` cannot be received agian.
- Events invoked before setting `Helpshift.setHelpshiftEventsListener` cannot be received agian.
- Please make sure you set the delegate immediately after calling the Helpshift install API to ensure you don't miss any events generated by the SDK.

</Admonition>

Expand Down Expand Up @@ -141,19 +142,19 @@ Helpshift.setHelpshiftEventsListener(new HelpshiftEventsListener() {
This event is triggered when the user clicks on the link or call action of an action card message.

- Event Name : `HelpshiftEvent.ACTION_CLICKED`
- Event data:
- Event data:
- `HelpshiftEvent.DATA_ACTION `
- `HelpshiftEvent.DATA_ACTION_TYPE `
- `HelpshiftEvent.DATA_ACTION_TYPE_CALL `
- `HelpshiftEvent.DATA_ACTION_TYPE_LINK `

| Key (Constant) | Key (Raw) | Type |
|-------------------------------|------------|--------|
| HelpshiftEvent.ACTION_CLICKED | userClickOnAction | String |
| HelpshiftEvent.DATA_ACTION | actionType | String |
| HelpshiftEvent.DATA_ACTION_TYPE | actionData | String |
| HelpshiftEvent.DATA_ACTION_TYPE_CALL | call | String |
| HelpshiftEvent.DATA_ACTION_TYPE_LINK | link | String |
| Key (Constant) | Key (Raw) | Type |
| ------------------------------------ | ----------------- | ------ |
| HelpshiftEvent.ACTION_CLICKED | userClickOnAction | String |
| HelpshiftEvent.DATA_ACTION | actionType | String |
| HelpshiftEvent.DATA_ACTION_TYPE | actionData | String |
| HelpshiftEvent.DATA_ACTION_TYPE_CALL | call | String |
| HelpshiftEvent.DATA_ACTION_TYPE_LINK | link | String |

<Admonition type="info" title="Note">

Expand Down Expand Up @@ -240,25 +241,25 @@ This event is triggered when the user receives any message from an agent in a co
- Event name : `HelpshiftEvent.AGENT_MESSAGE_RECEIVED`
- Event data:

| Key | Type | Value |
|-------------------------------|--------|--------- |
| HelpshiftEvent.DATA_PUBLISH_ID | String | Conversation ID of the ongoing issue |
| HelpshiftEvent.DATA_MESSAGE_TYPE | String | Message Type of the message |
| HelpshiftEvent.DATA_MESSAGE_BODY | String | The actual message sent by the agent or empty |
| HelpshiftEvent.DATA_CREATED_TIME | Long | Unix epoch timestamp in ms |
| HelpshiftEvent.DATA_ATTACHMENTS | Map<String, Object>> | Attachments, if they are present |
| HelpshiftEvent.DATA_URL | String | URL of the attachment |
| HelpshiftEvent.DATA_CONTENT_TYPE | String | MIME type of the attachment |
| HelpshiftEvent.DATA_FILE_NAME | String | File name of the attachment |
| HelpshiftEvent.DATA_SIZE | Integer | Size of the attachment in bytes |
| Key | Type | Value |
| -------------------------------- | ------------------- | --------------------------------------------- |
| HelpshiftEvent.DATA_PUBLISH_ID | String | Conversation ID of the ongoing issue |
| HelpshiftEvent.DATA_MESSAGE_TYPE | String | Message Type of the message |
| HelpshiftEvent.DATA_MESSAGE_BODY | String | The actual message sent by the agent or empty |
| HelpshiftEvent.DATA_CREATED_TIME | Long | Unix epoch timestamp in ms |
| HelpshiftEvent.DATA_ATTACHMENTS | Map<String, Object> | Attachments, if they are present |
| HelpshiftEvent.DATA_URL | String | URL of the attachment |
| HelpshiftEvent.DATA_CONTENT_TYPE | String | MIME type of the attachment |
| HelpshiftEvent.DATA_FILE_NAME | String | File name of the attachment |
| HelpshiftEvent.DATA_SIZE | Integer | Size of the attachment in bytes |

<Admonition type="info" title="Note">

- This delegate is available from 10.3.0 and above versions
- The attachments key is only present if the agent has sent attachments.
- Since attachments sent by agents may not have the necessary MIME type or name, it is possible that `HelpshiftEvent.DATA_CONTENT_TYPE` is absent from the payload.
For such cases, file type can be inferred from extension from file name
- HelpshiftEvent.DATA_MESSAGE_TYPE has following types :
- HelpshiftEvent.DATA_MESSAGE_TYPE has following types :
- HelpshiftEvent.DATA_MESSAGE_TYPE_APP_REVIEW_REQUEST
- HelpshiftEvent.DATA_MESSAGE_TYPE_SCREENSHOT_REQUEST
- HelpshiftEvent.DATA_MESSAGE_TYPE_TEXT
Expand Down Expand Up @@ -286,7 +287,7 @@ Helpshift.setHelpshiftEventsListener(new HelpshiftEventsListener() {

Log.d(TAG, "publishId " + publishId + " type " + type + " body " + body + " createdTs " + createdTs);
List<Object> attachments = (List<Object>) eventData.get(HelpshiftEvent.DATA_ATTACHMENTS);

if (Utils.isEmpty(attachments)) {
Log.d(TAG, "No attachments received in message");
} else {
Expand Down Expand Up @@ -502,3 +503,110 @@ If you call the method `Helpshift.requestUnreadMessageCount(true)` it will retur
If you want to retrieve the current notification count stored locally, you can call the same method with the parameter set to false, `Helpshift.requestUnreadMessageCount(false)`. In this case, SDK returns the count of unread messages available locally in this delegate method.

Locally saved unread message count are useful for saving an additional network call.

## User Identity System Events

When using Identity system related APIs, the related events are communicated to your app using the events mentioned in this section. Events can have associated data which gives more information on the corresponding event.
The constants for value of data is present in `InvalidDataErrorReason` file.

### INVALID_IDENTITY_TOKEN

Identities JWT not in valid format

- APIs - `addUserIdentities`
- Data - null

### IAT_IS_MANDATORY

The `iat` key is missing in JWT. Issued At Timestamp or `iat` is a mandatory key in the JWT payload.

- APIs - `addUserIdentities`
- Data - null

### IDENTITY_DATA_INVALID

Some of the identities in the JWT payload are not valid

- APIs - `addUserIdentities`
- Data -

| Key | Value | Recovery |
| ---------------------------------------- | ------------------------------------- | --------------------------------------------------------------------------------------------------- |
| One of the passed identity keys | EXCEEDED_KEY_LENGTH_LIMIT | Ensure key length is within permissible limit |
| One of the passed identity keys | EXCEEDED_VALUE_LENGTH_LIMIT | Ensure value length is within permissible limit |
| One of the passed identity keys | EMPTY_DATA | Ensure key or value is a valid non-empty value |
| One of the passed identity keys | META_DATA_EXCEEDED_COUNT_LIMIT | Ensure total number of entries in metadata dictionary for this identity is within permissible limit |
| One of the passed identity metadata keys | META_DATA_EXCEEDED_KEY_LENGTH_LIMIT | Ensure metadata key length is within permissible limit |
| One of the passed identity metadata keys | META_DATA_EXCEEDED_VALUE_LENGTH_LIMIT | Ensure metadata value length is within permissible limit |
| One of the passed identity metadata keys | METADATA_EMPTY_KEY_OR_VALUE | Ensure metadata key or value is a valid non-empty value |

### IDENTITY_DATA_LIMIT_EXCEEDED

Number of identities in JWT payload is more than the permissible limit

- APIs - `addUserIdentities`
- Data - null

### IDENTITY_DATA_SYNC_FAILED

User identities failed to sync with backend

- APIs - `addUserIdentities`
- Data -

| Key | Value | Recovery |
| ------------------------------- | ------------ | -------- |
| One of the passed identity keys | INVALID_DATA | NA |

### APP_ATTRIBUTES_LIMIT_EXCEEDED / MASTER_ATTRIBUTES_LIMIT_EXCEEDED

Number of unsynced app or master attributes exceeds the permissible limit

- APIs - `updateAppAttributes`, `updateMasterAttributes`
- Data - null

### APP_ATTRIBUTES_VALIDATION_FAILED / MASTER_ATTRIBUTES_VALIDATION_FAILED

Validation of individual entries inside the attributes dictionary failed

- APIs - `updateAppAttributes`, `updateMasterAttributes`
- Data -

| Key | Value | Recovery |
| -------------------------------- | --------------------------- | --------------------------------------------------------------------------------------------------------------- |
| One of the passed attribute keys | EXCEEDED_KEY_LENGTH_LIMIT | Ensure key length is within permissible limit |
| One of the passed attribute keys | EXCEEDED_VALUE_LENGTH_LIMIT | Ensure value length is within permissible limit |
| One of the passed attribute keys | EXCEEDED_COUNT_LIMIT | Reduce the number of entries in the collection for specified key |
| One of the passed attribute keys | INVALID_VALUE_TYPE | Ensure value is one of the supported types - String, Bool, Number, String array or a String - String dictionary |

### APP_ATTRIBUTES_SYNC_FAILED / MASTER_ATTRIBUTES_SYNC_FAILED

Attributes failed to sync with backend

- APIs - `updateAppAttributes`, `updateMasterAttributes`
- Data -

| Key | Value | Recovery |
| -------------------------------- | ------------ | -------- |
| One of the passed attribute keys | INVALID_DATA | NA |

### IDENTITY_FEATURE_NOT_ENABLED

Identity feature is not enabled for your domain

- APIs - `addUserIdentities`, `updateAppAttributes`, `updateMasterAttributes`
- Data - null

### USER_SESSION_EXPIRED

Sent when the SDK's user session expires. Once the session expires, SDK will keep sending this event to your app on each foreground.
In response to this event, you should refresh the JWT for the current user and [log them in](/sdkx_android/identity-users.mdx) again with the new JWT.

Data - null

### REFRESH_USER_CREDENTIALS

Sent when the SDK's user session is about to expire. This gives you a chance to proactively refresh the JWT for the current user and
log them in the SDK with the new JWT to avoid disrupting their session.

Data - null
4 changes: 3 additions & 1 deletion docs/sdkx_android/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ If you are on SDK X or migrating to SDK X please note the following requirements

<Admonition type="info" title="Note">

- From 10.4.0, SDK compiles on java 8 to support Android 15 compilation.
- Update (August 2023): SDK X 10.2.x is functional only above API Level 24 i.e Android OS 7 Nougat and above.
- SDK 10.3.0 functions and is supported on Android 7 and above (API level 24 and above). You can still compile your app using a minimum API level of 16, but the support starts for API level 24 and above.
For details regarding Helpshift SDK's Android OS support policy, please refer to [this article](https://support.helpshift.com/hc/en/13-helpshift-technical-support/faq/1217-sdk-x-os-technical-support-policy/).
Expand All @@ -50,7 +51,7 @@ Add the following dependencies to your `build.gradle` file inside the dependenci

<Tabs groupId="android-dependencies-example">

<TabItem value=">= 10.3.0" label="10.3.X">
<TabItem value=">= 10.3.0" label="Above 10.3.X">

```groovy
dependencies {
Expand Down Expand Up @@ -84,6 +85,7 @@ Helpshift is now ready to help you have conversations with your users!

| Helpshift SDK Version | minSDKVersion | compileSDKVersion | buildToolsVersion |
| --------------------- | ------------- | ----------------- | ----------------- |
| >= 10.4.0 | 19 | 35 | 35 |
| >= 10.3.0 | 16 | 34 | 34 |
| >= 10.2.0 | 16 | 33 | 33 |
| >= 10.0.2 | 16 | 31 | 31 |
Expand Down
Loading

0 comments on commit b925363

Please sign in to comment.