Skip to content

Commit 07be8d9

Browse files
committed
Use latest Intellicheck API for ID card verification. Use latest Ver-ID SDK version.
1 parent e19a445 commit 07be8d9

22 files changed

+739
-445
lines changed

app/build.gradle

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ apply plugin: 'com.google.gms.google-services'
33
apply plugin: 'com.google.firebase.crashlytics'
44

55
android {
6-
compileSdkVersion 29
7-
buildToolsVersion "29.0.2"
6+
compileSdkVersion 30
7+
buildToolsVersion "30.0.2"
88
defaultConfig {
99
applicationId "com.appliedrec.credentials.app"
1010
minSdkVersion rootProject.minSdkVersion
11-
targetSdkVersion 29
11+
targetSdkVersion 30
1212
versionCode rootProject.generateVersionCode()
1313
versionName rootProject.generateVersionName()
1414
buildConfigField "String", "BLINK_LICENCE_KEY", "\"" + blink5LicenceKey + "\""
1515
buildConfigField "String", "BLINK_SUPPORTED_DOCUMENTS_URL", "\"https://github.com/BlinkID/blinkid-android/blob/master/documentation/BlinkIDRecognizer.md\""
16-
buildConfigField "String", "INTELLICHECK_URL", "\"https://dev.ver-id.com/id-check/parse-verify\""
16+
buildConfigField "String", "INTELLICHECK_URL", "\"https://dev.ver-id.com/id-check/\""
1717
manifestPlaceholders = ["veridPassword": "8f821baf-4ae4-41cd-a175-91d7ef6a6db8"]
1818
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1919
}
@@ -28,30 +28,31 @@ android {
2828
}
2929

3030
compileOptions {
31+
coreLibraryDesugaringEnabled true
3132
sourceCompatibility JavaVersion.VERSION_1_8
3233
targetCompatibility JavaVersion.VERSION_1_8
3334
}
3435
}
3536

3637
dependencies {
38+
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:[1.0.9,2.0.0['
3739
implementation fileTree(dir: 'libs', include: ['*.jar'])
3840
implementation "androidx.appcompat:appcompat:$rootProject.appcompatVersion"
39-
implementation "com.appliedrec.verid:rx:$rootProject.rxveridVersion"
40-
implementation "com.appliedrec.verid:ui:$rootProject.veridVersion"
41+
implementation "com.appliedrec.verid:ui2:$rootProject.veridVersion"
4142
implementation "com.appliedrec.verid:identity:$rootProject.veridIdentityVersion"
4243
implementation "com.appliedrec.verid:ui-elements:$rootProject.uiElementsVersion"
43-
implementation 'com.google.firebase:firebase-analytics:17.4.4'
44-
implementation 'com.google.firebase:firebase-crashlytics:17.1.1'
44+
implementation 'com.google.firebase:firebase-analytics:18.0.0'
45+
implementation 'com.google.firebase:firebase-crashlytics:17.2.2'
4546
implementation("com.microblink:blinkid:$rootProject.blinkidVersion@aar") {
4647
transitive = true
4748
}
4849
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
4950
implementation 'androidx.security:security-crypto:1.1.0-alpha02'
50-
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
5151

52-
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
53-
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.2.0'
54-
androidTestImplementation 'androidx.test:runner:1.2.0'
55-
androidTestImplementation 'androidx.test:rules:1.2.0'
56-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
52+
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
53+
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.3.0'
54+
androidTestImplementation 'androidx.test:runner:1.3.0'
55+
androidTestImplementation 'androidx.test:rules:1.3.0'
56+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
57+
androidTestUtil 'androidx.test:orchestrator:1.3.0'
5758
}

app/src/androidTest/java/com/appliedrec/credentials/app/AppTests.java

Lines changed: 0 additions & 217 deletions
This file was deleted.

app/src/main/AndroidManifest.xml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,19 @@
88

99
<application
1010
android:name=".CredentialsApplication"
11-
android:icon="@mipmap/ic_launcher"
1211
android:allowBackup="false"
12+
android:icon="@mipmap/ic_launcher"
1313
android:label="@string/app_name"
1414
android:supportsRtl="true"
1515
android:theme="@style/Theme.AppCompat.Light.DarkActionBar">
16+
<activity android:name=".ResultActivity" />
17+
<activity android:name=".LoadingActivity">
18+
<intent-filter>
19+
<action android:name="android.intent.action.MAIN" />
20+
21+
<category android:name="android.intent.category.LAUNCHER" />
22+
</intent-filter>
23+
</activity>
1624
<activity android:name=".SettingsActivity" />
1725
<activity
1826
android:name=".DocumentDetailsActivity"
@@ -28,13 +36,7 @@
2836
android:label="@string/your_id_card" />
2937
<activity
3038
android:name=".MainActivity"
31-
android:label="@string/id_capture">
32-
<intent-filter>
33-
<action android:name="android.intent.action.MAIN" />
34-
35-
<category android:name="android.intent.category.LAUNCHER" />
36-
</intent-filter>
37-
</activity>
39+
android:label="@string/id_capture" />
3840

3941
<meta-data
4042
android:name="com.appliedrec.verid.password"

app/src/main/java/com/appliedrec/credentials/app/AboutActivity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import androidx.appcompat.app.AppCompatActivity;
88

9-
import com.appliedrec.verid.core.VerID;
9+
import com.appliedrec.verid.core2.VerID;
1010

1111
public class AboutActivity extends AppCompatActivity {
1212

@@ -24,7 +24,7 @@ public boolean onCreateOptionsMenu(Menu menu) {
2424
} catch (PackageManager.NameNotFoundException e) {
2525
e.printStackTrace();
2626
}
27-
String veridVersion = "Ver-ID SDK version: "+VerID.getVersion();
27+
String veridVersion = "Ver-ID SDK version: " + VerID.getVersion();
2828
menu.add(veridVersion);
2929
return true;
3030
}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
package com.appliedrec.credentials.app;
2+
3+
import android.os.Handler;
4+
import android.os.Looper;
5+
6+
import androidx.appcompat.app.AppCompatActivity;
7+
8+
import com.appliedrec.verid.core2.VerID;
9+
10+
import java.util.ArrayList;
11+
import java.util.Iterator;
12+
import java.util.concurrent.atomic.AtomicReference;
13+
14+
import io.reactivex.rxjava3.disposables.Disposable;
15+
16+
public abstract class BaseActivity extends AppCompatActivity {
17+
18+
ArrayList<Disposable> disposables = new ArrayList<>();
19+
AtomicReference<VerID> verIDRef = new AtomicReference<>();
20+
AtomicReference<ISharedData> sharedDataRef = new AtomicReference<>();
21+
22+
final void setVerIDProperties(VerID verID, ISharedData sharedData) {
23+
verIDRef.set(verID);
24+
sharedDataRef.set(sharedData);
25+
new Handler(Looper.getMainLooper()).post(this::onVerIDPropertiesAvailable);
26+
}
27+
28+
protected void onVerIDPropertiesAvailable() {
29+
}
30+
31+
final void addDisposable(Disposable disposable) {
32+
disposables.add(disposable);
33+
}
34+
35+
final void destroy() {
36+
Iterator<Disposable> disposableIterator = disposables.iterator();
37+
while (disposableIterator.hasNext()) {
38+
disposableIterator.next().dispose();
39+
disposableIterator.remove();
40+
}
41+
sharedDataRef.set(null);
42+
verIDRef.set(null);
43+
}
44+
45+
final VerID getVerID() throws Exception {
46+
VerID verID = verIDRef.get();
47+
if (verID == null) {
48+
throw new Exception("Ver-ID not available");
49+
}
50+
return verID;
51+
}
52+
53+
final ISharedData getSharedData() throws Exception {
54+
ISharedData sharedData = sharedDataRef.get();
55+
if (sharedData == null) {
56+
throw new Exception("Shared data not available");
57+
}
58+
return sharedData;
59+
}
60+
}

0 commit comments

Comments
 (0)