Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Onfido Product Support committed Dec 2, 2024
1 parent 817c16b commit d60b982
Show file tree
Hide file tree
Showing 9 changed files with 74 additions and 44 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,22 @@ 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](https://documentation.onfido.com/sdk/android/#language-localization)

## [22.1.0] - 2024-12-02

### Changed

- Handled an option to skip Motion Intro screen in Studio flow
- Added API to skip Motion Intro screen in Classic flow via `.withIntro(false)`
- The country names listed in the document selection screen are now translated according to the device locale
- Added a deprecation warning log for usage of manually-generated SDK tokens (in favour of using Studio tokens) alongside `workflowRunIDs`

### Fixed

- Fixed minor bugs with the new Capture codebase
- Fixed document capture showing document type screen after capturing document and moving to next step
- Fixed a publication issue within our SDK modules, which caused our `.aar`s to be missing from Maven central for the `onfido-capture-sdk` module (none of the other modules were impacted). Consequently, SDK integrations that were only importing this dependency were failing to compile: the dependencies were not correctly pulled and therefore imports were failing. Note: this was only happening when *not* using Onfido Studio (i.e. the `onfido-workflow` dependency being added was masking/working around the problem)
- Fixed a crash caused by a certain setup including aggressive Proguard rules. Note: only one customer was affected

## [21.2.2] - 2024-11-11

### Fixed
Expand All @@ -25,6 +41,7 @@ translations. [More on language localisation](https://documentation.onfido.com/s

- Updated the Kotlin version used from 1.7 to 1.9, as well as the Java version from 8 to 11
- Renamed `OnfidoActivityTheme` to `OnfidoLightTheme` for consistency with `OnfidoDarkTheme`. Also dropped `attr` suffix from font family theme attributes for consistency with other attribute names
- Removed `withBaseUrl` API from the `OnfidoConfig` public APIs

### Removed

Expand Down
7 changes: 7 additions & 0 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ The guides below are provided to ease the transition of existing applications us

If your migration involves upgrading across multiple SDK versions, be sure to read each individual guide in order to account for all relevant breaking changes.

## `22.0.0` -> `22.1.0`

### Deprecated API Changes

- Usage of manually-generated SDK tokens alongside Studio workflows is deprecated. Please use Studio tokens returned in the payload when creating a workflow run. For more details see: https://documentation.onfido.com/api/latest/#sdk-tokens

## `21.2.0` -> `22.0.0`

### Breaking API Changes
Expand All @@ -18,6 +24,7 @@ ProofOfAddress(type=UTILITY_BILL, front = (id = front_side_id, type = (optional)
- Removed `OnfidoConfig.Builder`'s deprecated methods: `withNFCReadFeature()` and `disableNFC()`. Use `withNFC(option: NFCOptions)` instead
- `OnfidoActivityTheme` has been renamed to `OnfidoLightTheme` for consistency with `OnfidoDarkTheme`
- The `attr` suffix has been removed from all font family theme attributes for consistency with other attribute names
- Removed `withBaseUrl` API from the `OnfidoConfig` public APIs

### String Changes

Expand Down
58 changes: 29 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Once you are satisfied with your integration and are ready to go live, please co

Check that you have entered correct billing details inside your [Onfido Dashboard](https://onfido.com/dashboard/), before going live.

## Adding the SDK dependency
## Adding the SDK dependency

The SDK supports API level 21 and above ([refer to the distribution stats](https://developer.android.com/about/dashboards/index.html)).

Expand Down Expand Up @@ -97,7 +97,7 @@ Average size (with Proguard enabled):

| ABI | Size |
|-------------|:--------:|
| armeabi-v7a | 14.71 Mb |
| armeabi-v7a | 14.81 Mb |
| arm64-v8a | 13.25 Mb |
| universal | 21.20 Mb |

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

| ABI | Size |
|------------------|:--------:|
| core-armeabi-v7a | 11.61 Mb |
| core-armeabi-v7a | 11.70 Mb |
| core-arm64-v8a | 9.97 Mb |
| core-universal | 14.82 Mb |

Expand Down Expand Up @@ -167,7 +167,7 @@ android {
```
Read the [Android documentation](http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits) for more information.

**Note**: To further reduce the footprint of the SDK beyond the lightweight `onfido-capture-sdk-core`, you can integrate the Android SDK as a Dynamic Feature Module. You'll find more details about this in the dedicated section below.
**Note**: To further reduce the footprint of the SDK beyond the lightweight `onfido-capture-sdk-core`, you can integrate the Android SDK as a Dynamic Feature Module. You'll find more details about this in the dedicated section below.

## Initializing the SDK

Expand Down Expand Up @@ -249,7 +249,7 @@ class YourCustomApplication : MultiDexApplication() {
if (isOnfidoProcess()) {
return
}

// Your custom initialization calls ...
}
}
Expand Down Expand Up @@ -296,16 +296,16 @@ The Android SDK supports the customization of colors, buttons, icons, fonts, wid

#### Appearance and Colors

You can customize colors and other appearance attributes by overriding Onfido themes (`OnfidoLightTheme`
You can customize colors and other appearance attributes by overriding Onfido themes (`OnfidoLightTheme`
and `OnfidoDarkTheme`) in your `themes.xml` or `styles.xml` files.
Make sure to set `OnfidoBaseActivityTheme` as the parent of `OnfidoLightTheme` and `OnfidoBaseDarkTheme` as the parent of `OnfidoDarkTheme` in your style definition.

All colors referenced in the themes should be defined in your `colors.xml` file. Alternatively, you can use hexadecimal
color values directly in the themes. When customizing fonts, all referenced fonts must be added to your project first.
All colors referenced in the themes should be defined in your `colors.xml` file. Alternatively, you can use hexadecimal
color values directly in the themes. When customizing fonts, all referenced fonts must be added to your project first.
Further instructions for adding fonts can be found in the [Android documentation](https://developer.android.com/develop/ui/views/text-and-emoji/fonts-in-xml).


For example, you can add these themes to your `themes.xml` to change the toolbar background and primary buttons'
For example, you can add these themes to your `themes.xml` to change the toolbar background and primary buttons'
color:

```xml
Expand All @@ -326,9 +326,9 @@ For a complete list and visualizations of the customizable attributes, refer to

#### Dark theme

Starting from [version 19.1.0](https://documentation.onfido.com/sdk/android/migration/#no--1900---1910), the Android SDK supports the dark theme. By default, the user's active device theme will be
automatically applied to the Onfido SDK. However, you can opt out from dynamic theme switching at run time
and instead set a theme statically at the build time as shown below. In this case, the flow will always be displayed
Starting from [version 19.1.0](https://documentation.onfido.com/sdk/android/migration/#no--1900---1910), the Android SDK supports the dark theme. By default, the user's active device theme will be
automatically applied to the Onfido SDK. However, you can opt out from dynamic theme switching at run time
and instead set a theme statically at the build time as shown below. In this case, the flow will always be displayed
in the selected theme regardless of the user's device theme.

To force select dark theme:
Expand Down Expand Up @@ -486,9 +486,9 @@ For the full list of languages supported by Onfido, please refer to our [SDK cus

**Custom language**

The Android SDK also allows for the selection of a specific custom language for locales that Onfido does not currently support. You can have an additional XML strings file inside your resources folder for the desired locale (for example, `res/values-it/onfido_strings.xml` for 🇮🇹 translation), with the content of our [strings.xml](strings.xml) file, translated for that locale.
The Android SDK also allows for the selection of a specific custom language for locales that Onfido does not currently support. You can have an additional XML strings file inside your resources folder for the desired locale (for example, `res/values-it/onfido_strings.xml` for 🇮🇹 translation), with the content of our `strings.xml` file ([reference](https://github.com/onfido/onfido-android-sdk/blob/master/translations/values/strings.xml)) file, translated for that locale.

When adding custom translations, please make sure you add the whole set of keys we have on [strings.xml](strings.xml).
When adding custom translations, please make sure you add the whole set of keys we have on `strings.xml`.

**Note**: If the strings translations change, it will result in a minor version change. If you have custom translations, you are responsible for testing your translated layout.

Expand All @@ -506,7 +506,7 @@ For more information on how to configure NFC and the list of supported documents

### Handling callbacks

When the Onfido SDK session concludes, a range of callback functions may be triggered. The callbacks detailed in this section apply to identity verification workflows orchestrated using Onfido Studio. For callbacks for manually-defined verification flows implemented without Onfido Studio, please refer to the [section below](#callbacks-for-manually-defined-verification-flows).
When the Onfido SDK session concludes, a range of callback functions may be triggered. The callbacks detailed in this section apply to identity verification workflows orchestrated using Onfido Studio. For callbacks for manually-defined verification flows implemented without Onfido Studio, please refer to the [section below](#callbacks-for-manually-defined-verification-flows).

For advanced callbacks used for user analytics and returning submitted media, please refer to the [Custom Media Callbacks](#custom-media-callbacks) and [User Analytics](#user-analytics) sections of this document.

Expand Down Expand Up @@ -600,7 +600,7 @@ override fun onException(exception: OnfidoWorkflow.WorkflowException) {
// This happens when workflow task encounters an error during biometric token retrieval
is WorkflowBiometricTokenStorageException ->
// This happens when workflow task encounters an error while storing biometric token
else ->
else ->
// Necessary because of Kotlin
}
}
Expand Down Expand Up @@ -756,18 +756,18 @@ This information is used to optimize the capture experience, as well as inform t
This selection screen is dynamic, and will be automatically hidden where the end user is not required to indicate which
document will be captured.

You can specify allowed issuing countries and document types for the document capture step in one of three ways:
You can specify allowed issuing countries and document types for the document capture step in one of three ways:
* If you are using Onfido Studio, this is configured within a Document Capture task, documented in the [Studio Product Guide](https://documentation.onfido.com/getting-started/onfido-studio-product#document-capture-task)
* Otherwise, the recommended approach is to apply this configuration globally in your [Dashboard](https://dashboard.onfido.com/) under Accounts \ Supported Documents, or hard code it into your SDK integration. Both of these options are documented below.

##### Country and document type selection by Dashboard
##### Country and document type selection by Dashboard

Configuring the issuing country and document type selection step using your Dashboard is the **recommended method** of integration (available from [iOS SDK](https://documentation.onfido.com/sdk/ios/) version 28.0.0 and [Android SDK](https://documentation.onfido.com/sdk/android/) version 16.0.0 onwards), as this configuration is also applied to your Document Reports. Any document that has been uploaded by an end user against your guidance will result in a Document Report sub-result of "rejected" and be flagged as `Image Integrity` > `Supported Document`.

_We will be rolling out Dashboard-based configuration of allowed documents soon. In the meantime, contact Onfido's [Customer Support](mailto:support@onfido.com) or your Customer Support Manager to request access to this feature_.

* Open the Accounts tab on your [Dashboard](https://dashboard.onfido.com/), then click Supported Documents
* You will be presented with a list of all available countries and their associated supported documents. Make your selection, then click Save Change.
* You will be presented with a list of all available countries and their associated supported documents. Make your selection, then click Save Change.

![Dashboard country and document selection](dashboard-supported-docs.png)

Expand Down Expand Up @@ -834,7 +834,7 @@ onfidoConfigBuilder.withAllowedDocumentTypes(documentTypes)

The configuration function allows you to specify the document's country of origin. If a document country is specified for a document type, the selection screen is displayed with the preselected country.

**Note**: You can specify a country for all document types except `PASSPORT`. This is because passports have the same format worldwide so the SDK does not require this additional information.
**Note**: You can specify a country for all document types except `PASSPORT`. This is because passports have the same format worldwide so the SDK does not require this additional information.

For example, to only capture UK driving licences:

Expand Down Expand Up @@ -998,7 +998,7 @@ implementation ("com.onfido.sdk:onfido-<variant>:19.1.0"){
implementation ("the other library that conflicts with Onfido on BouncyCastle") {
exclude group: "org.bouncycastle"
}
implementation "org.bouncycastle:bcprov-jdk15to18:1.69"
implementation "org.bouncycastle:bcutil-jdk15to18:1.69"
```
Expand Down Expand Up @@ -1069,12 +1069,12 @@ Document:
Front: DocumentSide(id=document_id, side=FRONT, type=DRIVING_LICENCE, nfcSupported=false)
Back: DocumentSide(id=document_id, side=BACK, type=DRIVING_LICENCE, nfcSupported=false)
Type: DRIVING_LICENCE
Face:
Face(id=face_id, variant=PHOTO)
Proof of address:
ProofOfAddress(type=UTILITY_BILL, front = (id = front_side_id, type = (optional)), back = (id = back_side_id, type = (optional)))
Face(id=face_id, variant=PHOTO)
Proof of address:
ProofOfAddress(type=UTILITY_BILL, front = (id = front_side_id, type = (optional)), back = (id = back_side_id, type = (optional)))
```
**Note**: the `type` property refers to `DocumentType`, variant refers to `FaceCaptureVariant`

Expand Down Expand Up @@ -1209,7 +1209,7 @@ class OnfidoEventListener implements OnfidoAnalyticsEventListener {

private final Context applicationContext;
private final Storage storage;

OnfidoEventListener(Context applicationContext, Storage storage) {
this.applicationContext = applicationContext;
this.storage = storage;
Expand Down Expand Up @@ -1264,7 +1264,7 @@ class OnfidoEventListener implements OnfidoAnalyticsEventListener {

private final Context applicationContext;
private final Storage storage;

OnfidoEventListener(Context applicationContext, Storage storage) {
this.applicationContext = applicationContext;
this.storage = storage;
Expand Down Expand Up @@ -1454,7 +1454,7 @@ Further information about the Onfido API is available in our [API reference](htt

## Support

Should you encounter any technical issues during integration, please contact Onfido's Customer Support team via [email](mailto:support@onfido.com), including the word ISSUE at the start of the subject line.
Should you encounter any technical issues during integration, please contact Onfido's Customer Support team via [email](mailto:support@onfido.com), including the word ISSUE at the start of the subject line.

Alternatively, you can search the support documentation available via the customer experience portal, [public.support.onfido.com](https://public.support.onfido.com/s/).

Expand Down
13 changes: 8 additions & 5 deletions sample-app-kotlin/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ plugins {
id 'kotlin-android'
}

def sdkVersion = '22.0.0'
def versionCodeNumber = 2200
def sdkVersion = '22.1.0'
def versionCodeNumber = 2210

android {
namespace 'com.onfido.android.app.sample'
compileSdkVersion 34
compileSdk 34
defaultConfig {
applicationId "com.onfido.sampleapp"
minSdkVersion 21
Expand All @@ -22,8 +22,11 @@ android {
abortOnError false
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
sourceCompatibility JavaVersion.VERSION_19
targetCompatibility JavaVersion.VERSION_19
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_19
}
buildTypes {
debug {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class MainActivity : AppCompatActivity() {
client!!.startActivityForResult(this@MainActivity, 1, onfidoConfig)
}

@Deprecated("Deprecated in Java")
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)
client!!.handleActivityResult(resultCode, data, object : Onfido.OnfidoResultListener {
Expand All @@ -68,4 +69,4 @@ class MainActivity : AppCompatActivity() {
private fun startCheck(captures: Captures) {
//Call your back end to initiate the check https://github.com/onfido/onfido-android-sdk#2-creating-a-check
}
}
}
4 changes: 2 additions & 2 deletions sample-app-kotlin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.4.2'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.21'
classpath 'com.android.tools.build:gradle:8.3.2'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.22'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand Down
3 changes: 2 additions & 1 deletion sample-app-kotlin/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#Thu Nov 21 13:05:47 CET 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
10 changes: 5 additions & 5 deletions sample-app/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
apply plugin: 'com.android.application'

def sdkVersion = '22.0.0'
def versionCodeNumber = 2200
def sdkVersion = '22.1.0'
def versionCodeNumber = 2210

android {
namespace 'com.onfido.android.app.sample'
compileSdkVersion 34
compileSdk 34
defaultConfig {
applicationId "com.onfido.sampleapp"
minSdkVersion 21
Expand All @@ -19,8 +19,8 @@ android {
abortOnError false
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
sourceCompatibility JavaVersion.VERSION_19
targetCompatibility JavaVersion.VERSION_19
}
buildTypes {
debug {
Expand Down
3 changes: 2 additions & 1 deletion sample-app/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#Thu Nov 21 13:04:07 CET 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit d60b982

Please sign in to comment.