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 23, 2020
1 parent 1900844 commit 99ab42e
Show file tree
Hide file tree
Showing 26 changed files with 737 additions and 25 deletions.
61 changes: 36 additions & 25 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,48 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
**Note**: If the strings translations change it will result in a MINOR version change, therefore you are responsible for testing your translated layout in case you are using custom translations. [More on language localisation](README.md#4-localisation)


## [5.3.3]
## [5.4.0] - 2020-01-23

### Added:
- Public: `Face` property added into `Captures` class
- Public: Added `sample-app` directory, in order to show sample usage of the sdk
- UI: Added folded document template for French driving license and Italian identity document
- UI: Updated [README.md](README.md) to clarify mobile token usage

### Changed:
- Internal: Updated Kotlin version to `1.3.50`
- UI: Changed camera overlay background color's opacity to enhance accessibility support

## [5.3.3] - 2020-01-08

### Fixed:
- Public: Fixed a crash when using sdkToken with proguard enabled

## [5.3.2] - [enterprise]
## [5.3.2] - [enterprise] - 2019-12-18

### Added:
- Public: Migration guide updated regarding to `OnfidoCertificatePinningSettings` changes

## [5.3.1]
## [5.3.1] - 2019-12-16

### Fixed:
- UI: Fixed a crash when inflating the `onfido_ic_watermark`
- UI: Fixed a bug that was preventing the Onfido logo to be visible

## [5.3.0]
## [5.3.0] - 2019-11-28

### Added:
- Public: `DocumentType.GENERIC` type added. For more information, please visit our [README.md](README.md#document-capture-step)

### Changed:
- UI: Liveness intro video accessibility string improved
- UI: Added folded paper document support for French driving license and Italian identity document

## [5.2.0]
## [5.2.0] - 2019-11-12

### Added:
- UI: `java.lang.Deprecated` annotation added additionally for the deprecated functions
- Internal: Improved RxJava2 error handling

### Changed:
- UI: Updated README to clarify `APPLICATION_ID` term and how to obtain sandbox token
Expand All @@ -44,7 +58,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- UI: The manual fallback countdown changed
- Internal: Changed token expiration identifier for the `onfido-api-client`

## [5.1.0]
## [5.1.0] - 2019-10-14

### Added:
- Public: Added SDK token support for US region
Expand All @@ -58,15 +72,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Removed:
- Public: Removed `check()` and `checkStatus()` functions from `OnfidoAPI`

## [5.0.1]

### Added:
- Internal: Improved RxJava2 error handling
## [5.0.1] - 2019-09-06

### Changed:
- Public: Improvements on our source code obfuscation strategy

## [5.0.0]
## [5.0.0] - 2019-08-20

### Added:
- Public: Added SDK token support (EU region)
Expand All @@ -80,7 +91,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Public: Removed applicant creation using the SDK, along with the `withApplicant(Applicant)` method of the `OnfidoConfig.Builder`.
The applicant should always from now on be created outside of the SDK and its id used to initialise the flow `withApplicant(String)` on the `OnfidoConfig.Builder`

## [4.11.1]
## [4.11.1] - 2019-11-07
**Note** Changes in this version are the changes applied on [v5.0.1](CHANGELOG.MD#501) to 4.11.0

### Added:
Expand All @@ -89,10 +100,10 @@ The applicant should always from now on be created outside of the SDK and its id
### Changed:
- Public: Improvements on our source code obfuscation strategy

## [4.11.0]
## [4.11.0] - 2019-08-12
*No changes since the previous release candidate version*

## [4.11.0-rc.1]
## [4.11.0-rc.1] - 2019-08-09

### Added:
- Internal: Support new token format
Expand All @@ -101,15 +112,15 @@ The applicant should always from now on be created outside of the SDK and its id
### Changed:
- Internal: Performance improvements to our liveness face tracking feature

## [4.10.0]
## [4.10.0] - 2019-07-18

### Added:
- Public: Added support for Gradle 5 and Android Studio Gradle plugin 3.4.x

### Changed:
- UI: Improved the video capture challenge generation and added error handling

## [4.9.0]
## [4.9.0] - 2019-06-11

### Added:
- Public: Added United States' driver's license autocapture as an experimental feature. Can be enabled by calling `withUSDLAutocapture()` in the `OnfidoConfig.Builder`
Expand All @@ -121,15 +132,15 @@ The applicant should always from now on be created outside of the SDK and its id
- Public: Fixed a crash when the host app was being killed by the system after sent to background and then recovered from, e.g., the recent apps list
- Public: Fixed a crash rarely happening when a user navigates through the liveness challenges flow

## [4.8.1]
## [4.8.1] - 2019-06-20

### Changed:
- Internal: Removed the strict requirement for the device to support autofocus in order to run the SDK.

### Fixed:
- Public: Fixed a bug that was causing the `onfidoPrimaryButtonTextColor` attribute to have no effect in the main button customisation

## [4.8.0]
## [4.8.0] - 2019-04-04

### Added:
- Public: Added the ability to skip the selfie intro screen by adding the `FaceCaptureVariantPhoto` that can be passed
Expand All @@ -149,7 +160,7 @@ This mode enforces that the flow will automatically exit through the `userExited
- Public: Fixed a crash when initialising the capture screen and we are not able to retrieve the camera parameters from the system
- Public: Fixed crash happening when the activity `android:label` property is required to be non-blank

## [4.7.0]
## [4.7.0] - 2019-03-05

### Changed:
- Public: Improved the documentation about adding custom translations and the `onfido_locale` string
Expand All @@ -165,7 +176,7 @@ This mode enforces that the flow will automatically exit through the `userExited
- UI: Fixed the issue of text getting cropped when going over 2 lines in bullet views.
The text can now go up to 3 lines and shows an ellipsis if the content is longer than that.

## [4.6.0]
## [4.6.0] - 2019-02-14

### Added:
- Public: Added support for preselection of Visa documents, through the `DocumentType.VISA` enum value
Expand All @@ -175,10 +186,10 @@ The text can now go up to 3 lines and shows an ellipsis if the content is longer
- UI: Redesigned the secondary action button to make it customisable
- UI: Added improvements to font size display when device accessibility features are enabled

## [4.5.1]
## [4.5.1] - 2019-01-28
*No changes since the previous release candidate version*

## [4.5.1-rc.2]
## [4.5.1-rc.2] - 2019-01-25

### Changed:
- UI: Removed all the hardcoded colour codes and now referencing the resource for every UI element with our primary UI colour
Expand All @@ -189,13 +200,13 @@ The text can now go up to 3 lines and shows an ellipsis if the content is longer
- Public: Fixed crash when requesting camera focus after the host app was killed by the system
- Public: Fixed crash when trying to fetch the dimensions of a view on the capture screen before it was measured for the first time

## [4.5.1-rc.1]
## [4.5.1-rc.1] - 2018-12-20

### Fixed:
- Public: Fixed crash when initialising our face detector
- Internal: Fixed bug when launching two consecutive flows with two distinct tokens

## [4.5.0]
## [4.5.0] - 2018-12-12

### Added:
- Public: Added the ability to preselect just a document type, without specifying any info about the country of origin nor ask the user to select it
Expand All @@ -217,7 +228,7 @@ The text can now go up to 3 lines and shows an ellipsis if the content is longer
### Deprecated:
- Public: Deprecated the custom `MessageScreenStep`, previously used to introduce custom messages in the flow

## [4.4.0]
## [4.4.0] - 2018-09-06

### Added:
- Public: Added the ability to customise action buttons and icons colors
Expand Down
20 changes: 20 additions & 0 deletions MIGRATION.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# Onfido Android SDK Migration Guide

## `5.3.3` -> `5.4.20`

### Added strings:
- `onfido_italian_id_capture_title`
- `onfido_french_driving_license_capture_title`
- `onfido_folded_paper_option`
- `onfido_plastic_card_option`
- `onfido_driving_license_type_selection_title`
- `onfido_national_identity_type_selection_title`
- `onfido_folded_paper_front_capture_title`
- `onfido_folded_paper_front_capture_subtitle`
- `onfido_folded_paper_back_capture_title`
- `onfido_folded_paper_back_capture_subtitle`
- `onfido_folded_paper_confirmation_title`
- `onfido_upload_photo`
- `onfido_retake_photo`

#### Deprecation
- Deprecated properties of `DocumentType` class

## `4.5.0-F5` -> `5.3.2` - [enterprise]

### Breaking changes
Expand Down
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,24 @@ In order to start integration, you will need the **API token** and the **mobile

**Warning:** You **MUST** use the **mobile SDK token** and not the **API token** when configuring the SDK itself.

##### Example Usage

##### 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");
```

### 5. Instantiating the client

To use the SDK, you need to obtain an instance of the client object:
Expand Down Expand Up @@ -284,6 +302,17 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data) {
When the user has successfully completed the flow, and the captured photos/videos have been uploaded, the `userCompleted` method will be invoked. The `Captures` object contains information about the document and face captures made during the flow.
With the applicant id, you can then [create a check](#creating-checks) for the user via your backend. On the other hand, if the user exits the flow without completing it, the `userExited` method will be invoked. Note that some images may have already been uploaded by this stage.

Sample of a `Captures` instance returned by a flow with `FlowStep.CAPTURE_DOCUMENT` and `FlowStep.CAPTURE_FACE`:
```
Document:
Front: DocumentSide(id=document_id, side=FRONT, type=DRIVING_LICENCE)
Back: DocumentSide(id=document_id, side=BACK, type=DRIVING_LICENCE)
Type: DRIVING_LICENCE
Face:
Face(id=face_id, variant=PHOTO)
```
**Note** `type` property refers to `DocumentType`, variant refers to `FaceCaptureVariant`

## Customising SDK

### 1. Flow customisation
Expand Down Expand Up @@ -485,6 +514,11 @@ Integrators of our library are then responsible for keeping this information alo

## More information

### Sample App

We have included sample app to show how to integrate the Onfido SDK. Please checkout [our sample app](sample-app)

### API Documentation
Further information about the underlying Onfido API is available in our documentation [here](https://onfido.com/documentation).

### Support
Expand Down
1 change: 1 addition & 0 deletions sample-app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
7 changes: 7 additions & 0 deletions sample-app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Onfido Capture SDK for Android: Sample app

Android application intended to showcase the [Onfido Android SDK](https://github.com/onfido/onfido-android-sdk).

Demo flow emulates a banking app, please don't forget to update `sdk token` in MainActivity to be able to complete flow

You need an Onfido account to use the sample app. Please contact us through our [website](https://onfido.com/signup) to create an Onfido account.
61 changes: 61 additions & 0 deletions sample-app/app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
apply plugin: 'com.android.application'

def sdkVersion = '5.4.0'
def versionCodeNumber = 540

android {
compileSdkVersion 29
defaultConfig {
applicationId "com.onfido.sampleapp"
minSdkVersion 16
targetSdkVersion 29
versionCode versionCodeNumber
versionName "$versionCode-sdk:$sdkVersion"
multiDexEnabled true
}

lintOptions {
abortOnError false
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildTypes {
debug {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
splits {
abi {
enable true
reset()
include 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
universalApk true //generate an additional APK that contains all the ABIs
}
}
}

repositories {
maven { url "https://dl.bintray.com/onfido/maven" }
maven { url 'https://maven.fabric.io/public' }
}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "com.onfido.sdk.capture:onfido-capture-sdk:$sdkVersion"
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.multidex:multidex:2.0.1'
testImplementation 'junit:junit:4.12'

// only required to support TLSv1.2 for devices with Android API lower than 5.x
implementation('com.google.android.gms:play-services-base:11.8.0') {
exclude group: 'com.android.support' // to avoid conflicts with your current support library
}
}
21 changes: 21 additions & 0 deletions sample-app/app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
25 changes: 25 additions & 0 deletions sample-app/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.onfido.android.app.sample">

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

<application xmlns:tools="http://schemas.android.com/tools"
android:allowBackup="true"
android:name="androidx.multidex.MultiDexApplication"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
tools:replace="android:theme"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

</manifest>
Loading

0 comments on commit 99ab42e

Please sign in to comment.