Skip to content

Commit

Permalink
Change minSDK Version to 21 (Android 5) instead of 26 (Android 8)
Browse files Browse the repository at this point in the history
  • Loading branch information
rjmangubat23 committed Jan 29, 2021
1 parent da578a1 commit 0aa6750
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 13 deletions.
6 changes: 3 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ android {

defaultConfig {
applicationId "org.idpass.smartscanner"
minSdkVersion 26
minSdkVersion 21
targetSdkVersion 30
versionName androidGitVersion.name()
versionCode androidGitVersion.code()
Expand Down Expand Up @@ -76,8 +76,8 @@ dependencies {
// ID PASS Smart Scanner
implementation project(path: ':core-lib')
//ID PASS lite
implementation project(path: ':idpass-lite')
implementation 'com.google.protobuf:protobuf-lite:3.0.1'
implementation 'com.google.protobuf:protobuf-lite:3.0.0'
implementation 'org.idpass:idpass-lite-java-android:0.1@aar'
// SmartScanner API Intent Call Out
implementation project(path: ':smartscanner-android-api')
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.widget.Toolbar
import org.idpass.lite.Card
import org.idpass.lite.android.IDPassLite
import org.idpass.lite.exceptions.CardVerificationException
import org.idpass.lite.exceptions.InvalidCardException
import org.idpass.lite.exceptions.InvalidKeyException
Expand Down Expand Up @@ -69,11 +68,6 @@ class IDPassResultActivity : AppCompatActivity(), View.OnClickListener {
supportActionBar?.setDisplayHomeAsUpEnabled(true)
supportActionBar?.setHomeButtonEnabled(true)
supportActionBar?.setHomeAsUpIndicator(R.drawable.ic_close)
// load ID Pass Lite models
val loaded = IDPassLite.loadModels(cacheDir, assets)
if (!loaded) {
Log.d("${SmartScannerActivity.TAG}/SmartScanner", "ID PASS Lite: Load models Failure")
}
// Display ID PASS Lite Result
intent.getByteArrayExtra(RESULT)?.let {
displayResult(it)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ class SmartScannerActivity : BaseActivity(), OnClickListener {
)
}
if (mode == Modes.IDPASS_LITE.value) {
val loaded = IDPassLite.loadModels(cacheDir, assets)
val loaded = IDPassLite.initialize(cacheDir, assets)
if (!loaded) Log.d("${TAG}/SmartScanner", "ID PASS Lite: Load models Failure")
analyzer = IDPassLiteAnalyzer(
activity = this,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import org.api.proto.Certificates
import org.api.proto.KeySet
import org.idpass.lite.Card
import org.idpass.lite.IDPassReader
import org.idpass.lite.android.IDPassLite
import org.idpass.lite.android.IDPassLiteHelper
import org.idpass.lite.exceptions.CardVerificationException
import org.idpass.lite.exceptions.InvalidCardException
import org.idpass.lite.exceptions.InvalidKeyException
Expand All @@ -40,8 +40,8 @@ object IDPassManager {

fun getIDPassReader(): IDPassReader {
// Initialize needed ks and rootcert from demo key values
val keysetbuf = IDPassLite.generateAndroidKeyset()
val rootcertbuf = IDPassLite.generateAndroidRootcert()
val keysetbuf = IDPassLiteHelper.generateAndroidKeyset()
val rootcertbuf = IDPassLiteHelper.generateAndroidRootcert()
val ks = KeySet.parseFrom(keysetbuf)
val rootcert = Certificates.parseFrom(rootcertbuf)
// Initialize reader with ks and rootcert
Expand Down

0 comments on commit 0aa6750

Please sign in to comment.