Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Onfido Android Team committed Jan 12, 2022
1 parent 4d60ae6 commit 1e55c2d
Show file tree
Hide file tree
Showing 6 changed files with 110 additions and 87 deletions.
16 changes: 10 additions & 6 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,24 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
are responsible for testing your translated layout in case you are using custom
translations. [More on language localisation](README.md#4-localisation)

## [10.3.3] - 2022-01-12
## [11.0.0] - 2022-01-10

### Fixed
### Added

- Public: Fixed the document overlay size problem that related passport document type
- UI: Fixed a ui glitch in document confirmation screen related to activity lifecycle
- Public: Added the Dutch locale

### Changed

## [10.3.2] - 2021-12-15
- Public: Upgraded compileSdkVersion and targetSdkVersion to version 31
- Public: Added more instructions in the NFC scan screen
- Public: Removed support for deprecated Mobile Token
- public: Updated document video recording instruction text

### Fixed

- Public: Fixed an NPE when recapturing a document
- Public: Fixed video preview cut-off
- Public: Fixed an NPE when starting liveness video recording
- Public: Fixed: initializing the SDK with Locale.ROOT causes a crash

## [10.3.1] - 2021-11-16

Expand Down
30 changes: 30 additions & 0 deletions MIGRATION.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
# Onfido Android SDK Migration Guide

## `10.3.1` -> `11.0.0`

### Breaking changes
- Removed deprecated `withToken(token)` and `withApplicant(ID)` from `OnfidoConfig.Builder` class.
Mobile tokens are not supported anymore, please use SDK tokens with `withSDKToken(token)`,
otherwise you will get an authorization exception when creating an applicant.

### Added strings
- `onfido_nfc_intro_carousel_body_dont_move`
- `onfido_nfc_intro_carousel_body_last_page`
- `onfido_nfc_intro_carousel_body_lay_flat`
- `onfido_nfc_intro_carousel_body_phone_top`
- `onfido_nfc_intro_carousel_body_remove_cover`
- `onfido_nfc_intro_sheet_ready_subtitle_passport"`
- `onfido_nfc_intro_sheet_scanning_subtitle`
- `onfido_nfc_intro_sheet_ready_subtitle_card`
- `onfido_nfc_intro_sheet_fail_instructions_card`
- `onfido_nfc_intro_sheet_fail_subtitle_card`
- `onfido_nfc_intro_sheet_fail_subtitle_passport`
- `onfido_nfc_intro_sheet_fail_instructions_passport`

### Changed strings:
- `onfido_nfc_intro_subtitle_passport`

### Added strings:
- `onfido_doc_capture_header_capturing`

### Removed strings:
- `onfido_doc_capture_header_scanning`

## `10.3.0` -> `10.3.1`

### Added strings
Expand Down
56 changes: 12 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ The SDK supports API level 21 and above ([distribution stats](https://developer.
Our configuration is currently set to the following:

- `minSdkVersion = 21`
- `targetSdkVersion = 28`
- `targetSdkVersion = 31`
- `android.useAndroidX=true`
- `Kotlin = 1.3+`
```
Expand Down Expand Up @@ -122,8 +122,8 @@ Average size (with Proguard enabled):

| ABI | Size |
| ----------- | :-----: |
| armeabi-v7a | 6.37 Mb |
| arm64-v8a | 7.25 Mb |
| armeabi-v7a | 6.48 Mb |
| arm64-v8a | 7.37 Mb |

#### 2.2 `onfido-capture-sdk-core`

Expand All @@ -143,7 +143,7 @@ Average size (with Proguard enabled):

| ABI | Size |
| ----------- | :-----: |
| universal | 3.84 Mb |
| universal | 3.95 Mb |


**Note**: The average sizes were measured by building the minimum possible wrappers around our SDK,
Expand Down Expand Up @@ -176,18 +176,7 @@ $ curl https://api.onfido.com/v3/applicants \

The JSON response will return an `id` field containing a UUID that identifies the applicant. Once you pass the applicant ID to the SDK, documents and live photos and videos uploaded by that instance of the SDK will be associated with that applicant.

### 4. Configure the SDK with tokens

The SDK supports 2 token mechanisms:

* `SDK token`
* `Mobile token`

We strongly recommend using a **SDK token**. It provides a more secure means of integration, as the token is temporary and applicant ID-bound.

**Note**: If you're using an SDK token, you shouldn't call the **withApplicantId** function.

#### 4.1 SDK tokens
### 4. Configure the SDK with a token

You'll need to generate and include an SDK token every time you initialize the SDK.
To generate an SDK token, make a request to the ['generate SDK token' endpoint](https://documentation.onfido.com/#generate-web-sdk-token).
Expand All @@ -206,7 +195,7 @@ $ curl https://api.onfido.com/v3/sdk_token \

:warning: SDK tokens expire after 90 minutes.

##### 4.1.1 `tokenExpirationHandler`
##### 4.1 `tokenExpirationHandler`

You can use the optional `tokenExpirationHandler` parameter in the SDK token configurator function to generate and pass a new SDK token when it expires. This ensures the SDK continues its flow even after an SDK token has expired.

Expand Down Expand Up @@ -245,31 +234,7 @@ OnfidoConfig.Builder config = new OnfidoConfig.Builder(context)
.withSDKToken("<YOUR_SDK_TOKEN>", new ExpirationHandler()); // ExpirationHandler is optional
```

**Note:** If you want to use `tokenExpirationHandler` you should pass a concrete class instance, you should not pass an **anonymous** or **activity** class instance.

#### 4.2 Mobile tokens

:warning: From **1st June 2021**, new SDK versions will no longer support Mobile tokens. Please migrate your integration to use [SDK tokens](#41-sdk-token) so that you can upgrade to new SDK versions in the future.

You can generate Mobile tokens in your [Onfido Dashboard](https://onfido.com/dashboard/api/tokens).

:warning: You must use the Mobile token and not the API token when configuring the SDK itself.

##### Kotlin

```kotlin
val config = OnfidoConfig.builder(context)
.withToken("<YOUR_MOBILE_TOKEN_HERE>")
.withApplicant("<YOUR_APPLICANT_ID_HERE>")
```

##### Java

```java
OnfidoConfig.Builder config = new OnfidoConfig.Builder(this)
.withToken("<YOUR_MOBILE_TOKEN_HERE>")
.withApplicant("<YOUR_APPLICANT_ID_HERE>");
```
**Note:** If you want to use `tokenExpirationHandler` you should pass a concrete class instance, you should not pass an **anonymous** or **activity** class instance.

### 5. Instantiate the client

Expand Down Expand Up @@ -412,10 +377,12 @@ You can configure the document step to capture single document types with specif

- **Document type**

The list of document types visible for the user to select can be filtered using this option. If only one document type is specified, users will not see the document selection screen or country selection screen and will be taken directly to the capture screen.
The list of document types visible for the user to select can be shown or hidden using this option. If only one document type is specified, users will not see the document selection screen or country selection screen and will be taken directly to the capture screen.

Each document type has its own configuration class.

**Note**: The specific document types included in the list cannot be customised

- **Document country**

The configuration function allows you to specify the document's country of origin. If a document country is specified for a document type, the country selection screen is not displayed.
Expand Down Expand Up @@ -633,6 +600,7 @@ The Onfido Android SDK supports and maintains translations for the following loc
- German (de) :de:
- Italian (it) :it:
- Portuguese (pt) :pt:
- Dutch (nl) :nl:

**Custom language**

Expand Down Expand Up @@ -709,7 +677,7 @@ You can use the data to keep track of how many users reach each screen in your f

## Going live

Once you are happy with your integration and are ready to go live, please contact [Client Support](mailto:client-support@onfido.com) to obtain a live API token (and Mobile token). You'll have to replace the sandbox tokens in your code with live tokens.
Once you are happy with your integration and are ready to go live, please contact [Client Support](mailto:client-support@onfido.com) to obtain a live API token. You'll have to replace the sandbox tokens in your code with live tokens.

Check the following before you go live:

Expand Down
4 changes: 2 additions & 2 deletions sample-app/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apply plugin: 'com.android.application'


def sdkVersion = '10.3.3'
def versionCodeNumber = 1033
def sdkVersion = '11.0.0'
def versionCodeNumber = 1100

android {
compileSdkVersion 30
Expand Down
2 changes: 1 addition & 1 deletion sample-app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ allprojects {

task clean(type: Delete) {
delete rootProject.buildDir
}
}
Loading

0 comments on commit 1e55c2d

Please sign in to comment.