Pārlūkot izejas kodu

修复冲突、

ifengouy 2 gadi atpakaļ
vecāks
revīzija
ef60bf21e6

+ 32 - 0
app/build.gradle

@@ -26,6 +26,11 @@ android {
         sourceCompatibility JavaVersion.VERSION_1_8
         targetCompatibility JavaVersion.VERSION_1_8
     }
+    sourceSets {
+        main {
+            jniLibs.srcDirs = ['libs']
+        }
+    }
 }
 
 dependencies {
@@ -33,7 +38,34 @@ dependencies {
     implementation 'androidx.appcompat:appcompat:1.3.0-alpha02'
     implementation 'com.google.android.material:material:1.2.1'
     implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
+    implementation files('libs\\zkandroididcardreader.jar')
+    implementation files('libs\\zkandroidcore.jar')
+    implementation files('libs\\universal-image-loader-1.9.3.jar')
     testImplementation 'junit:junit:4.+'
     androidTestImplementation 'androidx.test.ext:junit:1.1.2'
     androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
+
+
+    //旷视算法
+    implementation files('libs/FacePassAndroidSDK-McvSafe-release.aar')
+    implementation files('libs/mcvSafe.v1.2.2.aar')
+
+    implementation 'com.guo.android_extend:android-extend:1.0.1'
+    implementation('com.jakewharton:butterknife:8.5.1') {
+        exclude group: 'com.android.support', module: 'support-annotations'
+        exclude group: 'com.android.support', module: 'support-compat'
+    }
+
+//    implementation 'org.greenrobot:eventbus:3.1.1'
+    //retrofit
+    implementation 'com.squareup.retrofit2:retrofit:2.4.0'
+    implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
+    implementation 'com.squareup.okhttp3:logging-interceptor:3.11.0'
+
+
+    implementation 'com.github.bumptech.glide:glide:4.11.0'
+    implementation 'org.greenrobot:eventbus:3.2.0'
+    implementation 'com.tencent:mmkv-static:1.2.12'
+    // Okhttp库
+//    implementation 'com.google.code.gson:gson:2.8.5'
 }

+ 6 - 4
app/src/main/java/com/sunwin/visitorapp/BaseApplication.java

@@ -7,6 +7,8 @@ import com.sunwin.visitorapp.utils.PresentationManager;
 import com.sunwin.visitorapp.utils.SystemTTS;
 import com.sunwin.visitorapp.utils.UniversalImageLoaderConfiguration;
 
+import timber.log.Timber;
+
 
 public class BaseApplication extends Application {
     private static BaseApplication mInstance;
@@ -25,10 +27,10 @@ public class BaseApplication extends Application {
         /**
          * 仅在Debug时初始化Timber
          */
-        if (BuildConfig.DEBUG) {
-            Timber.plant(new Timber.DebugTree());
-        }
-        PresentationManager.checkAndShow(this);
+
+        Timber.plant(new Timber.DebugTree());
+
+//        PresentationManager.checkAndShow(this);
     }
 
     public static Context getInstance() {

+ 24 - 24
app/src/main/java/com/sunwin/visitorapp/utils/PresentationManager.java

@@ -33,30 +33,30 @@ public class PresentationManager {
     }
 
     public static void checkAndShow(Context context){
-        Timber.e("checkAndShow");
-        if(PresentationManager.canMuteScreen(context)){
-            Timber.e("canMuteScreen");
-            if(PresentationManager.permissionsMuteScreen(context)){
-                Timber.e("permissionsMuteScreen");
-                if(!PresentationManager.hasInit())PresentationManager.instanceInit(DisplayWelcome.class,context);
-                PresentationManager.show();
-            }else{
-                if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M) {
-                    new AlertDialog.Builder(context).setTitle("开启副屏权限")
-                            .setMessage("需要打开在其他应用上层显示,请去设置中开启此权限")
-                            .setNegativeButton("取消",null)
-                            .setPositiveButton("开启", new DialogInterface.OnClickListener() {
-                                @Override
-                                public void onClick(DialogInterface dialog, int which) {
-                                    Intent intent  = new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION);
-                                    intent.setData(Uri.parse("package:" + context.getPackageName()));
-                                    context.startActivity(intent);
-                                }
-                            }).create().show();
-                }
-
-            }
-        }
+//        Timber.e("checkAndShow");
+//        if(PresentationManager.canMuteScreen(context)){
+//            Timber.e("canMuteScreen");
+//            if(PresentationManager.permissionsMuteScreen(context)){
+//                Timber.e("permissionsMuteScreen");
+//                if(!PresentationManager.hasInit())PresentationManager.instanceInit(DisplayWelcome.class,context);
+//                PresentationManager.show();
+//            }else{
+//                if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M) {
+//                    new AlertDialog.Builder(context).setTitle("开启副屏权限")
+//                            .setMessage("需要打开在其他应用上层显示,请去设置中开启此权限")
+//                            .setNegativeButton("取消",null)
+//                            .setPositiveButton("开启", new DialogInterface.OnClickListener() {
+//                                @Override
+//                                public void onClick(DialogInterface dialog, int which) {
+//                                    Intent intent  = new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION);
+//                                    intent.setData(Uri.parse("package:" + context.getPackageName()));
+//                                    context.startActivity(intent);
+//                                }
+//                            }).create().show();
+//                }
+//
+//            }
+//        }
     }
 
     public static boolean canMuteScreen(Context context){

+ 1 - 1
app/src/main/res/drawable/card_white.xml

@@ -8,7 +8,7 @@
         android:topLeftRadius="@dimen/Normal_Card_Radius"
         android:topRightRadius="@dimen/Normal_Card_Radius" />
     <!--设置圆角背景色-->
-    <solid android:color="@color/Normal_Card_Color" />
+    <solid android:color="@color/ColorWhite" />
     <!--  设置边框大小与背景色-->
     <stroke
         android:width="2dp"

+ 1 - 1
app/src/main/res/layout/ac_visitor_register.xml

@@ -342,7 +342,7 @@
             <TextView
                 android:id="@+id/TextButtonSure"
                 android:layout_gravity="center_horizontal"
-                style="@style/TextButtonPrimary"
+                style="@style/StyleInputContent"
 
                 android:layout_marginHorizontal="100dp"
                 android:layout_width="match_parent"

+ 1 - 1
app/src/main/res/layout/activity_home.xml

@@ -15,7 +15,7 @@
         app:layout_constraintEnd_toEndOf="parent"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:text="@string/app_title"
+        android:text="66766"
         android:padding="15dp"
         android:textColor="@color/black"
         android:textSize="@dimen/sp_25" />

+ 2 - 0
app/src/main/res/values/strings.xml

@@ -7,4 +7,6 @@
 
 
     <string name="have_readed_id_card">身份证已经读取完成,请收回身份证</string>
+    <string name="veriface_hint">请正对屏幕</string>
+    <string name="usb_unauthorized">usb未授权</string>
 </resources>