diff --git a/app/build.gradle b/app/build.gradle index 17ff69f..60b65b7 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -4,11 +4,11 @@ plugins { } android { - namespace 'com.faceplugin.facerecognition' + namespace 'com.faceplugin.faceliveness' compileSdk 33 defaultConfig { - applicationId "com.faceplugin.facerecognition" + applicationId "com.faceplugin.faceliveness" minSdk 24 targetSdk 33 versionCode 2 diff --git a/app/src/androidTest/java/com/faceplugin/facerecognition/ExampleInstrumentedTest.kt b/app/src/androidTest/java/com/faceplugin/faceliveness/ExampleInstrumentedTest.kt similarity index 94% rename from app/src/androidTest/java/com/faceplugin/facerecognition/ExampleInstrumentedTest.kt rename to app/src/androidTest/java/com/faceplugin/faceliveness/ExampleInstrumentedTest.kt index 2892b78..550704d 100644 --- a/app/src/androidTest/java/com/faceplugin/facerecognition/ExampleInstrumentedTest.kt +++ b/app/src/androidTest/java/com/faceplugin/faceliveness/ExampleInstrumentedTest.kt @@ -1,4 +1,4 @@ -package com.faceplugin.facerecognition +package com.faceplugin.faceliveness import androidx.test.platform.app.InstrumentationRegistry import androidx.test.ext.junit.runners.AndroidJUnit4 diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index bc9a6cb..15087f5 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -19,7 +19,7 @@ android:name=".AttributeActivity" android:exported="false" /> diff --git a/app/src/main/java/com/faceplugin/facerecognition/AboutActivity.kt b/app/src/main/java/com/faceplugin/faceliveness/AboutActivity.kt similarity index 98% rename from app/src/main/java/com/faceplugin/facerecognition/AboutActivity.kt rename to app/src/main/java/com/faceplugin/faceliveness/AboutActivity.kt index e28f7f2..b29dd65 100644 --- a/app/src/main/java/com/faceplugin/facerecognition/AboutActivity.kt +++ b/app/src/main/java/com/faceplugin/faceliveness/AboutActivity.kt @@ -1,4 +1,4 @@ -package com.faceplugin.facerecognition +package com.faceplugin.faceliveness import android.content.Intent import android.content.pm.ResolveInfo diff --git a/app/src/main/java/com/faceplugin/facerecognition/AttributeActivity.kt b/app/src/main/java/com/faceplugin/faceliveness/AttributeActivity.kt similarity index 98% rename from app/src/main/java/com/faceplugin/facerecognition/AttributeActivity.kt rename to app/src/main/java/com/faceplugin/faceliveness/AttributeActivity.kt index d6e95a4..317ae00 100644 --- a/app/src/main/java/com/faceplugin/facerecognition/AttributeActivity.kt +++ b/app/src/main/java/com/faceplugin/faceliveness/AttributeActivity.kt @@ -1,4 +1,4 @@ -package com.faceplugin.facerecognition +package com.faceplugin.faceliveness import android.graphics.Bitmap import android.os.Bundle diff --git a/app/src/main/java/com/faceplugin/facerecognition/CameraActivity.java b/app/src/main/java/com/faceplugin/faceliveness/CameraActivity.java similarity index 99% rename from app/src/main/java/com/faceplugin/facerecognition/CameraActivity.java rename to app/src/main/java/com/faceplugin/faceliveness/CameraActivity.java index 6c9df97..f1ed79d 100644 --- a/app/src/main/java/com/faceplugin/facerecognition/CameraActivity.java +++ b/app/src/main/java/com/faceplugin/faceliveness/CameraActivity.java @@ -1,4 +1,4 @@ -package com.faceplugin.facerecognition; +package com.faceplugin.faceliveness; import static androidx.camera.core.ImageAnalysis.STRATEGY_KEEP_ONLY_LATEST; diff --git a/app/src/main/java/com/faceplugin/facerecognition/CameraActivityKt.kt b/app/src/main/java/com/faceplugin/faceliveness/CameraActivityKt.kt similarity index 99% rename from app/src/main/java/com/faceplugin/facerecognition/CameraActivityKt.kt rename to app/src/main/java/com/faceplugin/faceliveness/CameraActivityKt.kt index f8753c6..f75c9dd 100644 --- a/app/src/main/java/com/faceplugin/facerecognition/CameraActivityKt.kt +++ b/app/src/main/java/com/faceplugin/faceliveness/CameraActivityKt.kt @@ -1,4 +1,4 @@ -package com.faceplugin.facerecognition +package com.faceplugin.faceliveness import android.Manifest import android.content.Context diff --git a/app/src/main/java/com/faceplugin/facerecognition/CaptureActivity.java b/app/src/main/java/com/faceplugin/faceliveness/CaptureActivity.java similarity index 99% rename from app/src/main/java/com/faceplugin/facerecognition/CaptureActivity.java rename to app/src/main/java/com/faceplugin/faceliveness/CaptureActivity.java index 97a84ce..39c55b8 100644 --- a/app/src/main/java/com/faceplugin/facerecognition/CaptureActivity.java +++ b/app/src/main/java/com/faceplugin/faceliveness/CaptureActivity.java @@ -1,4 +1,4 @@ -package com.faceplugin.facerecognition; +package com.faceplugin.faceliveness; import static androidx.camera.core.ImageAnalysis.STRATEGY_KEEP_ONLY_LATEST; diff --git a/app/src/main/java/com/faceplugin/facerecognition/CaptureView.java b/app/src/main/java/com/faceplugin/faceliveness/CaptureView.java similarity index 99% rename from app/src/main/java/com/faceplugin/facerecognition/CaptureView.java rename to app/src/main/java/com/faceplugin/faceliveness/CaptureView.java index 6b26c7f..b14e5d4 100644 --- a/app/src/main/java/com/faceplugin/facerecognition/CaptureView.java +++ b/app/src/main/java/com/faceplugin/faceliveness/CaptureView.java @@ -1,4 +1,4 @@ -package com.faceplugin.facerecognition; +package com.faceplugin.faceliveness; import android.animation.Animator; import android.animation.ValueAnimator; diff --git a/app/src/main/java/com/faceplugin/facerecognition/DBManager.java b/app/src/main/java/com/faceplugin/faceliveness/DBManager.java similarity index 98% rename from app/src/main/java/com/faceplugin/facerecognition/DBManager.java rename to app/src/main/java/com/faceplugin/faceliveness/DBManager.java index 31f71fe..ec25a9b 100644 --- a/app/src/main/java/com/faceplugin/facerecognition/DBManager.java +++ b/app/src/main/java/com/faceplugin/faceliveness/DBManager.java @@ -1,4 +1,4 @@ -package com.faceplugin.facerecognition; +package com.faceplugin.faceliveness; import android.content.ContentValues; import android.content.Context; diff --git a/app/src/main/java/com/faceplugin/faceliveness/DatabaseActivity.java b/app/src/main/java/com/faceplugin/faceliveness/DatabaseActivity.java new file mode 100644 index 0000000..5db266f --- /dev/null +++ b/app/src/main/java/com/faceplugin/faceliveness/DatabaseActivity.java @@ -0,0 +1,14 @@ +package com.faceplugin.faceliveness; + +import android.os.Bundle; + +import androidx.appcompat.app.AppCompatActivity; + +public class DatabaseActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_splash); + } +} diff --git a/app/src/main/java/com/faceplugin/facerecognition/FACE_CAPTURE_STATE.java b/app/src/main/java/com/faceplugin/faceliveness/FACE_CAPTURE_STATE.java similarity index 80% rename from app/src/main/java/com/faceplugin/facerecognition/FACE_CAPTURE_STATE.java rename to app/src/main/java/com/faceplugin/faceliveness/FACE_CAPTURE_STATE.java index e2ea187..89c23c7 100644 --- a/app/src/main/java/com/faceplugin/facerecognition/FACE_CAPTURE_STATE.java +++ b/app/src/main/java/com/faceplugin/faceliveness/FACE_CAPTURE_STATE.java @@ -1,4 +1,4 @@ -package com.faceplugin.facerecognition; +package com.faceplugin.faceliveness; public enum FACE_CAPTURE_STATE { NO_FACE, MULTIPLE_FACES, FIT_IN_CIRCLE, MOVE_CLOSER, NO_FRONT, FACE_OCCLUDED, EYE_CLOSED, MOUTH_OPENED, SPOOFED_FACE, CAPTURE_OK diff --git a/app/src/main/java/com/faceplugin/facerecognition/FaceView.java b/app/src/main/java/com/faceplugin/faceliveness/FaceView.java similarity index 98% rename from app/src/main/java/com/faceplugin/facerecognition/FaceView.java rename to app/src/main/java/com/faceplugin/faceliveness/FaceView.java index a8a3a52..654366c 100644 --- a/app/src/main/java/com/faceplugin/facerecognition/FaceView.java +++ b/app/src/main/java/com/faceplugin/faceliveness/FaceView.java @@ -1,4 +1,4 @@ -package com.faceplugin.facerecognition; +package com.faceplugin.faceliveness; import android.content.Context; import android.graphics.Canvas; diff --git a/app/src/main/java/com/faceplugin/facerecognition/MainActivity.kt b/app/src/main/java/com/faceplugin/faceliveness/MainActivity.kt similarity index 79% rename from app/src/main/java/com/faceplugin/facerecognition/MainActivity.kt rename to app/src/main/java/com/faceplugin/faceliveness/MainActivity.kt index 92e2df9..50b3121 100644 --- a/app/src/main/java/com/faceplugin/facerecognition/MainActivity.kt +++ b/app/src/main/java/com/faceplugin/faceliveness/MainActivity.kt @@ -1,4 +1,4 @@ -package com.faceplugin.facerecognition +package com.faceplugin.faceliveness import android.content.Intent import android.graphics.Bitmap @@ -27,15 +27,14 @@ class MainActivity : AppCompatActivity() { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) - textWarning = findViewById(R.id.textWarning) - +// textWarning = findViewById(R.id.textWarning) var ret = FaceSDK.setActivation( - "Nd7j+5R17t1DEkFbd8eXiVMSCdYkHNFMaLDYEMPtJehvdILceeRQDlzpCeOBw0BnyWGCK09XfQDX\n" + - "l3jIeFIi001ynzyleFk5IwA7ZCqnYWBXOCaMfPpd/RUKMKewAdj5q5nbNRzTVIT2v2cir9g6yiNb\n" + - "dav0nX3pLt0q+wB5gyyBZiBcL9Qg2vGeM7F/pN5j0m0v04BVle50GOpn7tIc4Bab+WEC3e9tYAQC\n" + - "adKDtlWrV+wwsmvWtxbtafkohUEW/dGcjURPpQ1TVAj20wfpDdz6HEiXkJQ/jCbaQmg7haB9Pj9+\n" + - "yl9CDAj/THRzoz8C193VhFQG6No8iUFc7w6oCg==" + "f0Y15I2DXE4BP9g3pkGRzcM7HQatMXrQ3B85fFNSb80QJ7txgdrdWpX8EbRjafdCoPBmv3TqeHRc\n" + + "lTIrQBGF7sQUpe2XdEcrkjZgvQBhD4zFlAqMrBvaRaSiGE+LLGa/5XjrOlFpk+1UAlZcPiq+YrBG\n" + + "eS5zDY7FkhPze1q9nsg19yJ7yDFFkCc04ChKcXyNAk8UipYc4CWWx8xnVticyDQI74bdm273kQJw\n" + + "IhL/lwCspEDEVScFycCSIPPTDf3JX3jmZIjcKk8cQjWcPT00/Bly/eYM3KyDk19QXgQ9w86yCL3S\n" + + "kpS91aW3SY7PqVZR2fK56bqxP4dsagSIUJHO6Q==" ) if (ret == FaceSDK.SDK_SUCCESS) { @@ -61,30 +60,30 @@ class MainActivity : AppCompatActivity() { dbManager.loadPerson() personAdapter = PersonAdapter(this, DBManager.personList) - val listView: ListView = findViewById(R.id.listPerson) as ListView - listView.setAdapter(personAdapter) - - findViewById