Skip to content

Commit 6fa23ff

Browse files
Brand-new Fingerprint Pro demo app, version 3.0.0
1 parent 25bb01e commit 6fa23ff

File tree

81 files changed

+3780
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+3780
-0
lines changed

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
.DS_Store
5+
/build
6+
/captures
7+
.externalNativeBuild
8+
.cxx
9+
local.properties
10+
.idea/

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Fingerprint ®
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<p align="center">
2+
<picture>
3+
<source media="(prefers-color-scheme: dark)" srcset="res/logo_light.svg" />
4+
<source media="(prefers-color-scheme: light)" srcset="res/logo_dark.svg" />
5+
<img src="res/logo_dark.svg" alt="Fingerprint logo" width="312px" />
6+
</picture>
7+
</p>
8+
<p align="center">
9+
<a href="https://discord.gg/39EpE2neBg">
10+
<img src="https://img.shields.io/discord/852099967190433792?style=logo&label=Discord&logo=Discord&logoColor=white" alt="Discord server">
11+
</a>
12+
<a href="https://android-arsenal.com/api?level=21">
13+
<img src="https://img.shields.io/badge/API-21%2B-brightgreen.svg" alt="Android minAPI status">
14+
</a>
15+
</p>
16+
17+
<p align="center">
18+
<a href='https://play.google.com/store/apps/details?id=com.fingerprintjs.android.fpjs_pro_demo'>
19+
<img alt='Get it on Google Play' src='https://play.google.com/intl/en_us/badges/static/images/badges/en_badge_web_generic.png' width="240px"/>
20+
</a>
21+
</p>
22+
23+
# Fingerprint Pro Android
24+
An Android application that showcases the capabilities of Fingerprint Identification SDK.

app/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

app/build.gradle.kts

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
import com.android.build.gradle.internal.api.BaseVariantOutputImpl
2+
3+
@Suppress("PropertyName")
4+
val VERSION_NAME="3.0.0"
5+
@Suppress("PropertyName")
6+
val VERSION_CODE=21
7+
@Suppress("PropertyName")
8+
val SDK_VERSION_NAME="2.4.0"
9+
10+
plugins {
11+
id("com.android.application")
12+
id("org.jetbrains.kotlin.android")
13+
}
14+
15+
android {
16+
namespace = "com.fingerprintjs.android.fpjs_pro_demo"
17+
compileSdk = 34
18+
19+
20+
externalNativeBuild {
21+
cmake {
22+
path = File("src/main/cpp/CMakeLists.txt")
23+
}
24+
}
25+
26+
27+
defaultConfig {
28+
applicationId = "com.fingerprintjs.android.fpjs_pro_demo"
29+
minSdk = 21
30+
targetSdk = 34
31+
versionCode = VERSION_CODE
32+
versionName = VERSION_NAME
33+
34+
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
35+
vectorDrawables {
36+
useSupportLibrary = true
37+
}
38+
buildConfigField("String", "SDK_VERSION_NAME", "\"${SDK_VERSION_NAME}\"")
39+
}
40+
41+
signingConfigs {
42+
create("release") {
43+
storeFile = file("release.jks")
44+
storePassword = System.getenv("KEYSTORE_PASSWORD")
45+
keyAlias = System.getenv("RELEASE_SIGN_KEY_ALIAS")
46+
keyPassword = System.getenv("RELEASE_SIGN_KEY_PASSWORD")
47+
}
48+
create("releaseLocalSign") {
49+
storeFile = file("release_local.jks")
50+
storePassword = "password"
51+
keyAlias = "key0"
52+
keyPassword = "password"
53+
}
54+
}
55+
56+
buildTypes {
57+
debug {
58+
buildConfigField("boolean", "ALLOW_MOCKS", "true")
59+
}
60+
release {
61+
isMinifyEnabled = true
62+
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
63+
signingConfig = signingConfigs.getByName("release")
64+
buildConfigField("boolean", "ALLOW_MOCKS", "false")
65+
}
66+
create("releaseLocalSign") {
67+
isMinifyEnabled = true
68+
proguardFiles (getDefaultProguardFile ("proguard-android-optimize.txt"), "proguard-rules.pro")
69+
signingConfig = signingConfigs.getByName("releaseLocalSign")
70+
matchingFallbacks += listOf("release")
71+
buildConfigField("boolean", "ALLOW_MOCKS", "true")
72+
}
73+
}
74+
75+
compileOptions {
76+
sourceCompatibility = JavaVersion.VERSION_1_8
77+
targetCompatibility = JavaVersion.VERSION_1_8
78+
}
79+
kotlinOptions {
80+
jvmTarget = "1.8"
81+
}
82+
buildFeatures {
83+
buildConfig = true
84+
compose = true
85+
}
86+
composeOptions {
87+
kotlinCompilerExtensionVersion = "1.5.1"
88+
}
89+
packaging {
90+
resources {
91+
excludes += "/META-INF/{AL2.0,LGPL2.1}"
92+
}
93+
}
94+
applicationVariants.all {
95+
val variant = this
96+
this.outputs.all {
97+
(this as? BaseVariantOutputImpl)?.outputFileName = "FPJS-Pro-Playground-${variant.name}-${variant.versionName}.apk"
98+
}
99+
}
100+
}
101+
102+
dependencies {
103+
val useFpProDebugVersion = false // switch to true when needed to debug the locally built library
104+
implementation("com.fingerprint.android:pro:$SDK_VERSION_NAME${if (useFpProDebugVersion) "-debug" else ""}")
105+
implementation("androidx.core:core-ktx:1.12.0")
106+
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.7.0")
107+
implementation("androidx.activity:activity-compose:1.8.2")
108+
implementation(platform("androidx.compose:compose-bom:2024.02.01"))
109+
implementation("androidx.compose.ui:ui")
110+
implementation("androidx.compose.ui:ui-graphics")
111+
implementation("androidx.compose.ui:ui-tooling-preview")
112+
implementation("androidx.compose.material3:material3")
113+
implementation("androidx.core:core-splashscreen:1.0.1")
114+
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.7.0")
115+
implementation("com.valentinilk.shimmer:compose-shimmer:1.2.0")
116+
implementation ("com.google.code.gson:gson:2.10.1")
117+
testImplementation("junit:junit:4.13.2")
118+
androidTestImplementation("androidx.test.ext:junit:1.1.5")
119+
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
120+
androidTestImplementation(platform("androidx.compose:compose-bom:2023.08.00"))
121+
androidTestImplementation("androidx.compose.ui:ui-test-junit4")
122+
debugImplementation("androidx.compose.ui:ui-tooling")
123+
debugImplementation("androidx.compose.ui:ui-test-manifest")
124+
}

app/proguard-rules.pro

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile

app/release.jks

2.24 KB
Binary file not shown.

app/release_local.jks

2.65 KB
Binary file not shown.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package com.fingerprintjs.android.fpjs_pro_demo
2+
3+
import androidx.test.platform.app.InstrumentationRegistry
4+
import androidx.test.ext.junit.runners.AndroidJUnit4
5+
6+
import org.junit.Test
7+
import org.junit.runner.RunWith
8+
9+
import org.junit.Assert.*
10+
11+
/**
12+
* Instrumented test, which will execute on an Android device.
13+
*
14+
* See [testing documentation](http://d.android.com/tools/testing).
15+
*/
16+
@RunWith(AndroidJUnit4::class)
17+
class ExampleInstrumentedTest {
18+
@Test
19+
fun useAppContext() {
20+
// Context of the app under test.
21+
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22+
assertEquals("com.fingerprintjs.android.fpjs_pro_demo", appContext.packageName)
23+
}
24+
}

app/src/main/AndroidManifest.xml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
3+
4+
<application
5+
android:allowBackup="true"
6+
android:icon="@mipmap/ic_launcher"
7+
android:label="@string/app_name"
8+
android:roundIcon="@mipmap/ic_launcher_round"
9+
android:supportsRtl="true"
10+
android:theme="@style/Theme.Splash"
11+
>
12+
<activity
13+
android:name=".MainActivity"
14+
android:configChanges="orientation"
15+
android:screenOrientation="portrait"
16+
android:exported="true">
17+
<intent-filter>
18+
<action android:name="android.intent.action.MAIN" />
19+
<category android:name="android.intent.category.LAUNCHER" />
20+
</intent-filter>
21+
</activity>
22+
</application>
23+
24+
</manifest>

0 commit comments

Comments
 (0)