Skip to content

Commit

Permalink
Release commit for 3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
JumioMobileTeam committed Feb 27, 2019
1 parent a5c7ad8 commit 1b3ba90
Show file tree
Hide file tree
Showing 40 changed files with 2,032 additions and 326 deletions.
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,19 @@
- [Support](#support)

# Release notes
SDK version: 2.15.0
SDK version: 3.0.0

#### Changes
* New ISO 30107-3 Level 1 compliant 3D face liveness capturing technology [Netverify] *
* Added the option to screen share the SDK in debug builds [Netverify/Fastfill, Document Verification, BAM Checkout]
* Initial release of the [Jumio Authentication](https://www.jumio.com/authentication/) SDK [Authentication]
* Optimized 3D liveness handling to increase user conversion [Netverify]
* Added customUI support for 3D Liveness and Authentication [Netverify, Authentication]
* Improved MRZ reading accuracy [Netverify/Fastfill]
* Improved scanning experience for most European Driving licenses [Netverify/Fastfill]
* Renamed some public methods [Netverify/Fastfill, Document Verification]

#### Fixes
* Fixed a problem in which N/A was returned as the identityVerification result in the server callback [Netverify]
* Various smaller bug fixes/improvements [Netverify/Fastfill, Document Verification, BAM Checkout]

<sub>(&ast;Workflow changes on server will be applied on January 31)<sub>

# Basic Setup

## General Requirements
Expand Down Expand Up @@ -83,7 +84,7 @@ defaultConfig {
}
```

The apk can be splitted based on the architecture if multiple apks should be uploaded to the Google Play Store. Google Play Store manages to deliver the appropriate apk for the device.
The apk can be split based on the architecture if multiple apks should be uploaded to the Google Play Store. Google Play Store manages to deliver the appropriate apk for the device.
```
splits {
abi {
Expand Down Expand Up @@ -115,13 +116,14 @@ Our SDK supports accessibility features. Visually impaired users can now enable

# Get started
- [Integration Netverify & Fastfill SDK](docs/integration_netverify-fastfill.md)
- [Integration Authentication SDK](docs/integration_authentication.md)
- [Integration Document Verification SDK](docs/integration_document-verification.md)
- [Integration BAM Checkout SDK](docs/integration_bam-checkout.md)

# Support

## Previous version
The previous release version 2.14.0 of the Jumio Mobile SDK is supported until 2019-04-23.
The previous release version 2.15.0 of the Jumio Mobile SDK is supported until 2019-06-05.

In case the support period is expired, no bug fixes are provided anymore (typically fixed in the upcoming versions). The SDK will keep functioning (until further notice).

Expand Down
Binary file added docs/images/authentication.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
251 changes: 251 additions & 0 deletions docs/integration_authentication.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,251 @@
![Authentication](images/authentication.png)

# Authentication SDK for Android
Biometric-based Jumio Authentication establishes the digital identities of your users through the simple act of taking a selfie. Advanced 3D face map technology quickly and securely authenticates users and unlocks their digital identities.

## Table of Content

- [Release notes](#release-notes)
- [Setup](#setup)
- [Dependencies](#dependencies)
- [Initialization](#integration)
- [Customization](#customization)
- [SDK Workflow](#sdk-workflow)
- [Custom UI](#custom-ui)
- [Javadoc](https://jumio.github.io/mobile-sdk-android/)

## Release notes
For technical changes, please read our [transition guide](transition-guide_authentication.md) SDK version: 3.0.0

## Setup
The [basic setup](../README.md#basic-setup) is required before continuing with the following setup for Authentication.

Using the SDK requires an activity declaration in your `AndroidManifest.xml`.

```
<activity
android:name="com.jumio.auth.AuthenticationActivity"
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"
android:hardwareAccelerated="true"
android:theme="@style/Theme.Authentication"
android:windowSoftInputMode="adjustResize"/>
```

You can specify your own theme (see chapter [Customization](#customization)). The orientation can be sensor-based or locked with the attribute `android:screenOrientation`. Please note: scanning only works in portrait mode.

## Dependencies

The [Sample app](https://github.com/Jumio/mobile-sdk-android/blob/master/sample/JumioMobileSample/) apk size with the products Netverify, BAM, Document Verification and Authentication included is currently __27.95 MB__.

|Dependency | Mandatory | Description | Size (Jumio libs only) |
| ---------------------------- |:-------------:|:-----------------|:---------:|
|com.jumio.android:core:3.0.0@aar | x | Jumio Core library | 4.53 MB |
|com.jumio.android:auth:3.0.0@aar | x | Authentication library | 81.54 KB |
|com.jumio.android:face:3.0.0@aar | x | Face library | 83.22 KB |
|com.facetec:zoom-authentication-hybrid:7.0.5@aar | x | Zoom face scanning library | 11.5 MB |
|androidx.appcompat:appcompat:1.0.0 | x | Android appcompat library | - |
|androidx.room:room-runtime:2.0.0 | x | Android database object mapping library | - |
|com.google.android.material:material:1.0.0 | | Android material design library | - |
|com.jumio.android:javadoc:3.0.0 | | Jumio SDK Javadoc | - |

### Others

#### Root detection
Applications implementing the SDK shall not run on rooted devices. Use either the method below or a self-devised check to prevent usage of SDK scanning functionality on rooted devices.
```
AuthenticationSDK.isRooted(Context context);
```

#### Device supported check
Call the method `isSupportedPlatform` to check if the device platform is supported by the SDK.

```
AuthenticationSDK.isSupportedPlatform();
```

## Initialization
To create an instance for the SDK, perform the following call as soon as your activity is initialized.

```
private static String YOURAPITOKEN = ""; 
private static String YOURAPISECRET = "";
AuthenticationSDK authenticationSDK = AuthenticationSDK.create(yourActivity, YOURAPITOKEN, YOURAPISECRET, JumioDataCenter.US);
```
Make sure that your customer API token and API secret are correct, specify an instance of your activity and provide a reference to identify the transactions in your reports (max. 100 characters or `null`). If your customer account is in the EU data center, use `JumioDataCenter.EU` instead.

__Note:__ When logged into the Jumio Customer Portal, you will find your API token and API secret on the **Settings** page under **API credentials**. We strongly recommend that you store your credentials outside your app.

## Configuration

### Callback
A callback URL can be specified for individual transactions (for constraints see chapter [Callback URL](https://github.com/Jumio/implementation-guides/blob/master/netverify/callback.md#callback-url)). This setting overrides any callback URL you have set in the Jumio Customer Portal.

```
authenticationSDK.setCallbackUrl("YOURCALLBACKURL");
```

### Transaction identifiers
You can set a user reference (max. 100 characters).

__Note:__ The user reference must not contain sensitive data like PII (Personally Identifiable Information) or account login.
```
authenticationSDK.setUserReference("USERREFERENCE");
```

### Analytics Service

You receive a list of the current DebugSessionID by using getDebugID. This method can be called either after initializing or before dismissing the SDK.

```
authenticationSDK.getDebugID();
```

## Customization
[Jumio Surface](https://jumio.github.io/surface-android/) is a web tool that allows you to apply and visualize, in real-time, all available customization options for the Authentication SDK, as well as an export feature to import the applied changes straight into your codebase.

Use the tab __"Customize SDK"__ to check out all the screens and adapt the look and feel of the SDK to your needs.

The tab __"XML Output"__ visualizes all the colors that can be customized. As visualized in the code there, the SDK can be customized to fit your application's look and feel by specifying `Theme.Authentication` as a parent style and overriding attributes within this theme.

After customizing the SDK, you can copy the code from the theme `CustomAuthenticationTheme` to your Android app `styles.xml` file.

### Customize look and feel
There are 2 options for applying the customized theme described in the previous chapter:
* Customizing theme in AndroidManifest
* Customizing theme at runtime


#### Customizing theme in AndroidManifest
Apply the `CustomAuthenticationTheme` that you defined earlier by replacing `Theme.Authentication` in the AndroidManifest.xml:
```
<activity
android:name="com.jumio.auth.AuthenticationActivity"
android:theme="@style/CustomAuthenticationTheme"
... />
```

#### Customizing theme at runtime
To customize the theme at runtime, overwrite the theme that is used for Authentication in the manifest by calling the following property. Use the resource id of a customized theme that uses Theme.Authentication as parent.

```
authenticationSDK.setCustomTheme(CUSTOMTHEME);
```

## SDK Workflow

### Starting the SDK
Use the initiate method to preload the SDK. This ensures that the provided enrollment transaction reference is valid and applicable for Authentication. If initialization failes, the SDK can not be started and will throw a `RuntimeException` if `authenticationSDK.start()` or `authenticationSDK.getIntent()` is called.
```
String enrollmentTransactionReference = "";
authenticationSDK.initiate(enrollmentTransactionReference, new AuthenticationInitiateCallback() {
@Override
public void onAuthenticationInitiateSuccess() {
// YOURCODE - the SDK can now be started
}
@Override
public void onAuthenticationInitiateError(String errorCode, String errorMessage, boolean retryPossible) {
// YOURCODE
}
});
```
To show the SDK, call the respective method below within your activity or fragment.
Activity: `authenticationSDK.start();` <br/>
Fragment: `startActivityForResult(authenticationSDK.getIntent(), AuthenticationSDK.REQUEST_CODE);`

__Note:__ The default request code is 500. To use another code, override the public static variable `AuthenticationSDK.REQUEST_CODE` before displaying the SDK.


### Retrieving information

Implement the standard `onActivityResult` method in your activity or fragment for successful scans (`Activity.RESULT_OK`) and user cancellation notifications (`Activity.RESULT_CANCELED`). Call `authenticationSDK.destroy()` once you have received the result.

```
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == AuthenticationSDK.REQUEST_CODE) {
if (data == null)
return;
if (resultCode == Activity.RESULT_OK) {
String transactionReference = (data == null) ? "" : data.getStringExtra(AuthenticationSDK.EXTRA_TRANSACTION_REFERENCE);
AuthenticationResult authenticationResult = (AuthenticationResult) data.getSerializableExtra(AuthenticationSDK.EXTRA_SCAN_DATA);
} else if (resultCode == Activity.RESULT_CANCELED) {
String transactionReference = (data == null) ? "" : data.getStringExtra(AuthenticationSDK.EXTRA_TRANSACTION_REFERENCE);
String errorMessage = data.getStringExtra(AuthenticationSDK.EXTRA_ERROR_MESSAGE);
String errorCode = data.getStringExtra(AuthenticationSDK.EXTRA_ERROR_CODE);
}
//At this point, the SDK is not needed anymore. It is highly advisable to call destroy(), so that
//internal resources can be freed.
if (authenticationSDK != null) {
authenticationSDK.destroy();
authenticationSDK = null;
}
}
}
```

#### Authentication Result

|AuthenticationResult | Description |
| :---------------------------- |:-----------------|
|SUCCESS|Authentication was successful - user is live and matches his ID/Identity Verification transaction|
|FAILED|Authentication failed - user is not live OR does not match the ID/Identity Verification transaction|

#### Error codes

|Code | Message | Description |
| :--------------:|:---------|:-----------------|
|A10000| We have encountered a network communication problem | Retry possible, user decided to cancel |
|B10000| Authentication failed | Secure connection could not be established, retry impossible |
|C10401| Authentication failed | API credentials invalid, retry impossible |
|D10403| Authentication failed | Wrong API credentials used, retry impossible|
|E20000| No Internet connection available | Retry possible, user decided to cancel |
|F00000| Scanning not available at this time, please contact the app vendor | Resources cannot be loaded, retry impossible |
|G00000| Cancelled by end-user | No error occurred |
|H00000| The camera is currently not available | Camera cannot be initialized, retry impossible |
|I00000| Certificate not valid anymore. Please update your application | End-to-end encryption key not valid anymore, retry impossible |
|J00000| Transaction already finished | User did not complete SDK journey within session lifetime|
|L00000| Enrollment transaction reference invalid | The provided enrollment transaction reference can not be used for an authentication |
|M00000| The scan could not be processed | An error happened during the processing. The SDK needs to be started again|

The first letter (A-M) represents the error case. The remaining characters are represented by numbers that contain information helping us understand the problem situation. Please always include the whole code when filing an error related issue to our support team.

## Custom UI
Authentication can be also implemented as a custom scan view. This means that only the scan view (including the scan overlays) are provided by the SDK.
The handling of the lifecycle, intermediate callbacks, and all other steps necessary to complete a scan have to be handled by the client application that implements the SDK.

**Note:** Authentication is not supported on tablets. If it is initialized on a tablet device, a PlatformNotSupportedException will be raised.

To use the custom scan view with a plain scanning user interface, specify an instance of your class which implements the [AuthenticationCustomSDKInterface](https://jumio.github.io/mobile-sdk-android/com/jumio/auth/custom/AuthenticationCustomScanInterface.html). You will receive a [AuthenticationCustomSDKController](https://jumio.github.io/mobile-sdk-android/com/jumio/auth/custom/AuthenticationCustomSDKController.html) object.


Add your AuthenticationCustomScanView to your layout and specify desired layout attributes using
* width as match_parent, and height as wrap_content
* or width and height as match_parent (full screen).

Using width as match_parent, the AuthenticationCustomScanView attribute ratio needs to be set to any float value between screen width/screen height (e.g. portrait 720/1280 = ~0.6) and 1. If your AuthenticationCustomScanView is added to your layout via xml, specify the namespace below to access the custom attribute *yourNameSpace:ratio*. Face scans can only be done in portrait orientation with a recommended ratio of 1 or smaller.
```
xmlns:yourNameSpace="http://schemas.android.com/apk/lib/com.jumio.mobile.sdk"
```

Start scanning by providing an instance of the class `AuthenticationCustomScanView` and an instance of your class which implements the [AuthenticationCustomScanInterface](https://jumio.github.io/mobile-sdk-android/com/jumio/auth/custom/AuthenticationCustomScanInterface.html).

### Retrieving information

#### Result & Error handling
Instead of using the standard method `onActivityResult`, implement the following methods within *yourAuthenticationCustomSDKInterface* for successful scans and error notifications:

The method `onAuthenticationFinished(AuthenticationResult authenticationResult, String transactionReference)` has to be implemented to handle data after successful scans.

Upon `onAuthenticationError(String errorCode, String errorMessage, boolean retryPossible, String transactionReference)`, you can show the error message and/or call `authenticationCustomSDKController.retry()` if retryPossible.

**Note**: Error codes are listed [here](#error-codes).

#### Clean up
After handling the result, it is very important to clean up the SDK by calling `authenticationCustomSDKController.destroy()` and `authenticationSDK.destroy()`.

## Callback

To get information about callbacks, please read our [page with server related information](https://github.com/Jumio/implementation-guides/blob/master/netverify/callback.md).

__Note:__ Callbacks for Authentication will be available later in March 2019, please check availability with your Account Manager.
12 changes: 4 additions & 8 deletions docs/integration_bam-checkout.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ BAM Checkout SDK is a powerful, cutting-edge solution to extract data from your
- [Javadoc](https://jumio.github.io/mobile-sdk-android/)

## Release notes
For technical changes, please read our [transition guide](transition-guide_bam-checkout.md) SDK version: 2.15.0
For technical changes, please read our [transition guide](transition-guide_bam-checkout.md) SDK version: 3.0.0

## Setup
The [basic setup](../README.md#basic-setup) is required before continuing with the following setup for Bam-Checkout.
Expand All @@ -42,11 +42,11 @@ If you want to use offline scanning for BAM Checkout (Credit card scanning), ple

|Dependency | Mandatory | Description | Size (Jumio libs only) |
| :---------------------------- |:-------------:|:-----------------|:------------:|
|com.jumio.android:core:2.15.0@aar | x | Jumio Core library| 4.52 MB |
|com.jumio.android:bam:2.15.0@aar | x | BAM Checkout library | 2.02 MB |
|com.jumio.android:core:3.0.0@aar | x | Jumio Core library| 4.53 MB |
|com.jumio.android:bam:3.0.0@aar | x | BAM Checkout library | 2.03 MB |
|androidx.appcompat:appcompat:1.0.0 | x | Android appcompat library| - |
|androidx.room:room-runtime:2.0.0 | x | Android database object mapping library | - |
|com.jumio.android:javadoc:2.15.0 | | Jumio SDK Javadoc| - |
|com.jumio.android:javadoc:3.0.0 | | Jumio SDK Javadoc| - |

If an optional module is not linked, the scan method is not available but the library size is reduced.

Expand Down Expand Up @@ -326,7 +326,3 @@ http://www.jumio.com/implementation-guides/credit-card-retrieval-api/
## Two-factor Authentication

If you want to enable two-factor authentication for your Jumio customer portal please contact us at https://support.jumio.com Once enabled, users will be guided through the setup upon their first login to obtain a security code using the "Google Authenticator" app.

## Copyright

&copy; Jumio Corp. 268 Lambert Avenue, Palo Alto, CA 94306

0 comments on commit 1b3ba90

Please sign in to comment.