Browse Source

增加大朝华15.6探视机A01型号兼容

weizhengliang 1 year ago
parent
commit
db0228df8d

+ 1 - 0
android_visiting/src/main/AndroidManifest.xml

@@ -20,6 +20,7 @@
     <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
     <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
     <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
     <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
+    <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE"/>
     <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" /> <!-- 悬浮窗显示 -->
     <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" /> <!-- 悬浮窗显示 -->
     <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
     <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
     <uses-permission android:name="android.permission.SYSTEM_OVERLAY_WINDOW" />
     <uses-permission android:name="android.permission.SYSTEM_OVERLAY_WINDOW" />

+ 22 - 0
android_visiting/src/main/java/com/wdkl/ncs/android/component/home/activity/AppUpdateActivity.kt

@@ -11,6 +11,8 @@ import com.wdkl.ncs.android.component.home.BuildConfig
 import com.wdkl.ncs.android.component.home.R
 import com.wdkl.ncs.android.component.home.R
 import com.wdkl.ncs.android.component.home.databinding.ActivityAppUpdateBinding
 import com.wdkl.ncs.android.component.home.databinding.ActivityAppUpdateBinding
 import com.wdkl.ncs.android.component.home.helper.AppUpdateHelper
 import com.wdkl.ncs.android.component.home.helper.AppUpdateHelper
+import com.wdkl.ncs.android.component.home.helper.AppUpdateHelper.FILE_APK_NAME
+import com.wdkl.ncs.android.component.home.helper.AppUpdateHelper.FILE_APK_PATH
 import com.wdkl.ncs.android.component.home.helper.HttpHelper
 import com.wdkl.ncs.android.component.home.helper.HttpHelper
 import com.wdkl.ncs.android.component.home.helper.StatusBarHelper
 import com.wdkl.ncs.android.component.home.helper.StatusBarHelper
 import com.wdkl.ncs.android.component.home.launch.VisitingLaunch
 import com.wdkl.ncs.android.component.home.launch.VisitingLaunch
@@ -116,6 +118,12 @@ class AppUpdateActivity :BaseActivity<HomeAppUpdatePresenter, ActivityAppUpdateB
                     installAppKaer()
                     installAppKaer()
                 } else if ("rk3128".equals(Build.MODEL)) {
                 } else if ("rk3128".equals(Build.MODEL)) {
                     startInstallApk3128()
                     startInstallApk3128()
+                } else if ("A01".equals(Build.MODEL)) {
+                    if (apiConnect) {
+                        manager?.silentInstallApk("$FILE_APK_PATH/$FILE_APK_NAME", true)
+                    } else {
+                        installAppKaer()
+                    }
                 } else {
                 } else {
                     startInstallApk()
                     startInstallApk()
                 }
                 }
@@ -229,6 +237,20 @@ class AppUpdateActivity :BaseActivity<HomeAppUpdatePresenter, ActivityAppUpdateB
         //
         //
     }
     }
 
 
+    override fun onStop() {
+        super.onStop()
+
+        if (Build.BOARD.equals("k37tv1_64_bsp") || Build.BOARD.equals("k37mv1_64_bsp") || Build.MODEL.equals("KT10-3F") || "m3520b_bnkj_zx".equals(Build.MODEL)) {
+            StatusBarHelper.toggleStatusBar(activity, true)
+        }
+
+        if ("A01".equals(Build.MODEL)) {
+            if (apiConnect) {
+                manager?.hideNavBar(false)
+            }
+        }
+    }
+
     //数据加载错误
     //数据加载错误
     override fun onError(message: String, type: Int) {
     override fun onError(message: String, type: Int) {
         showMessage("获取版本失败!")
         showMessage("获取版本失败!")

+ 17 - 1
android_visiting/src/main/java/com/wdkl/ncs/android/component/home/activity/VisitingActivationActivity.kt

@@ -92,10 +92,17 @@ class VisitingActivationActivity : BaseActivity<HomeActivityPresenter, VisitingA
         //init
         //init
         NetHelper.getInstance().init()
         NetHelper.getInstance().init()
 
 
-        if (Build.BOARD.equals("k37tv1_64_bsp") || Build.BOARD.equals("k37mv1_64_bsp") || Build.MODEL.equals("KT10-3F")) {
+        if (Build.BOARD.equals("k37tv1_64_bsp") || Build.BOARD.equals("k37mv1_64_bsp") || Build.MODEL.equals("KT10-3F") || "m3520b_bnkj_zx".equals(Build.MODEL)) {
             StatusBarHelper.toggleStatusBar(activity, true)
             StatusBarHelper.toggleStatusBar(activity, true)
         }
         }
 
 
+        if ("A01".equals(Build.MODEL)) {
+            //大朝华15.6寸rk平台主机
+            if (apiConnect) {
+                manager?.hideNavBar(false)
+            }
+        }
+
         //anr catcher
         //anr catcher
         //AnrFcExceptionUtil.getInstance(BaseApplication.appContext).initFCException()
         //AnrFcExceptionUtil.getInstance(BaseApplication.appContext).initFCException()
         //xCrash catcher
         //xCrash catcher
@@ -135,6 +142,14 @@ class VisitingActivationActivity : BaseActivity<HomeActivityPresenter, VisitingA
         //注册方式
         //注册方式
         HardWareFactroy.getHardTools().Registration(this)
         HardWareFactroy.getHardTools().Registration(this)
 
 
+        if ("A01".equals(Build.MODEL)) {
+            if (apiConnect) {
+                Constant.imei = manager?.serial
+                Constant.LOCAL_MAC = manager?.ethMacAddress
+                Constant.DEVICE_REGISTER_ID = Constant.imei
+            }
+        }
+
         val isActivation = SPUtils.get(this, Constant.APP_ACTIVATION, "");
         val isActivation = SPUtils.get(this, Constant.APP_ACTIVATION, "");
         if (isActivation.equals("已激活")){
         if (isActivation.equals("已激活")){
             activation_title.setText("系统连接失败")
             activation_title.setText("系统连接失败")
@@ -151,6 +166,7 @@ class VisitingActivationActivity : BaseActivity<HomeActivityPresenter, VisitingA
         //设置二维码
         //设置二维码
         setQrcode()
         setQrcode()
 
 
+        app_name.text = getString(R.string.wdkl_app_name)
         activation_v.text =  BuildConfig.VERSION_NAME + "_" + BuildConfig.VERSION_CODE + "_" + Build.MODEL
         activation_v.text =  BuildConfig.VERSION_NAME + "_" + BuildConfig.VERSION_CODE + "_" + Build.MODEL
         activation_ip.text = NetHelper.getInstance().localIP
         activation_ip.text = NetHelper.getInstance().localIP
         //activation_wg.text = NetHelper.getInstance().gateway()
         //activation_wg.text = NetHelper.getInstance().gateway()

+ 20 - 2
android_visiting/src/main/java/com/wdkl/ncs/android/component/home/activity/VisitingActivity.kt

@@ -374,6 +374,12 @@ class VisitingActivity : BaseActivity<HomeActivityPresenter, ActivityHomeBinding
             if (Build.BOARD.equals("k37tv1_64_bsp") || Build.BOARD.equals("k37mv1_64_bsp") || Build.MODEL.equals("KT10-3F")) {
             if (Build.BOARD.equals("k37tv1_64_bsp") || Build.BOARD.equals("k37mv1_64_bsp") || Build.MODEL.equals("KT10-3F")) {
                 StatusBarHelper.toggleStatusBar(activity, false)
                 StatusBarHelper.toggleStatusBar(activity, false)
             }
             }
+
+            if ("A01".equals(Build.MODEL)) {
+                if (apiConnect) {
+                    manager?.hideNavBar(true)
+                }
+            }
         }
         }
     }
     }
 
 
@@ -383,6 +389,12 @@ class VisitingActivity : BaseActivity<HomeActivityPresenter, ActivityHomeBinding
         if (Build.BOARD.equals("k37tv1_64_bsp") || Build.BOARD.equals("k37mv1_64_bsp") || Build.MODEL.equals("KT10-3F")) {
         if (Build.BOARD.equals("k37tv1_64_bsp") || Build.BOARD.equals("k37mv1_64_bsp") || Build.MODEL.equals("KT10-3F")) {
             StatusBarHelper.toggleStatusBar(activity, true)
             StatusBarHelper.toggleStatusBar(activity, true)
         }
         }
+
+        if ("A01".equals(Build.MODEL)) {
+            if (apiConnect) {
+                manager?.hideNavBar(false)
+            }
+        }
     }
     }
 
 
     /**
     /**
@@ -426,6 +438,12 @@ class VisitingActivity : BaseActivity<HomeActivityPresenter, ActivityHomeBinding
             StatusBarHelper.toggleStatusBar(activity, true)
             StatusBarHelper.toggleStatusBar(activity, true)
         }
         }
 
 
+        if ("A01".equals(Build.MODEL)) {
+            if (apiConnect) {
+                manager?.hideNavBar(false)
+            }
+        }
+
         HardWareFactroy.getHardTools().unInit()
         HardWareFactroy.getHardTools().unInit()
     }
     }
 
 
@@ -614,12 +632,12 @@ class VisitingActivity : BaseActivity<HomeActivityPresenter, ActivityHomeBinding
 
 
     override fun onKeyDown(keyCode: Int, event: KeyEvent?): Boolean {
     override fun onKeyDown(keyCode: Int, event: KeyEvent?): Boolean {
         Log.d(TAG, "keyDown ====> keyCode: $keyCode, action: ${event?.action}")
         Log.d(TAG, "keyDown ====> keyCode: $keyCode, action: ${event?.action}")
-        if (keyCode == 135) {
+        if (keyCode == 135 || keyCode == 139) {
             //手柄拿起
             //手柄拿起
             Log.e(TAG,"手柄拿起 ")
             Log.e(TAG,"手柄拿起 ")
             Constant.hookOn = false
             Constant.hookOn = false
             AppUtils.switchAudioMode(activity, false)
             AppUtils.switchAudioMode(activity, false)
-        } else if (keyCode == 134) {
+        } else if (keyCode == 134 || keyCode == 138) {
             //手柄放下
             //手柄放下
             Log.e(TAG,"手柄放下 ")
             Log.e(TAG,"手柄放下 ")
             Constant.hookOn = true
             Constant.hookOn = true

+ 0 - 10
android_visiting/src/main/java/com/wdkl/ncs/android/component/home/fragment/SkyCallFragment.kt

@@ -63,16 +63,6 @@ class SkyCallFragment: BaseCallFragment(), CallSessionCallback {
     private var volume = 60
     private var volume = 60
 
 
     override fun getLayId(): Int {
     override fun getLayId(): Int {
-        /*if ("YUNPAI_H6".equals(Build.MODEL, true) || "rk3288".equals(Build.MODEL, true)
-            || "KT10-3F".equals(Build.MODEL, true) || "KT10-2F".equals(Build.MODEL, true)
-            || "KT8001-2F".equals(Build.MODEL, true)) {
-            return R.layout.sky_voice_call_layout_land
-        } else if ("m3520b_bnkj_zx".equals(Build.MODEL, true)) {
-            return R.layout.sky_voice_call_layout_land_1920
-        } else {
-            return R.layout.sky_voice_call_layout
-        }*/
-
         return R.layout.sky_voice_call_layout
         return R.layout.sky_voice_call_layout
     }
     }
 
 

+ 28 - 5
android_visiting/src/main/res/layout-land/visiting_activation.xml

@@ -39,7 +39,7 @@
             android:layout_width="match_parent"
             android:layout_width="match_parent"
             android:layout_height="match_parent"
             android:layout_height="match_parent"
             android:layout_marginLeft="@dimen/d600"
             android:layout_marginLeft="@dimen/d600"
-            android:layout_marginTop="@dimen/d41"
+            android:layout_marginTop="@dimen/d20"
             android:layout_marginRight="@dimen/d24"
             android:layout_marginRight="@dimen/d24"
             android:layout_marginBottom="@dimen/d10"
             android:layout_marginBottom="@dimen/d10"
             android:background="@drawable/shape_bed_bg"
             android:background="@drawable/shape_bed_bg"
@@ -65,8 +65,31 @@
             <ImageView
             <ImageView
                 android:id="@+id/activation_qr_code"
                 android:id="@+id/activation_qr_code"
                 android:layout_width="@dimen/d160"
                 android:layout_width="@dimen/d160"
-                android:layout_height="@dimen/d160"
-                android:layout_marginTop="@dimen/d10" />
+                android:layout_height="@dimen/d160" />
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:paddingLeft="@dimen/d60"
+                android:orientation="horizontal">
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="名称:"
+                    android:textColor="@color/black"
+                    android:textSize="@dimen/font_size_18"
+                    android:textStyle="bold" />
+
+                <TextView
+                    android:id="@+id/app_name"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginLeft="@dimen/d10"
+                    android:textColor="@color/txt_setting"
+                    android:textSize="@dimen/font_size_16" />
+
+            </LinearLayout>
 
 
             <LinearLayout
             <LinearLayout
                 android:layout_width="match_parent"
                 android:layout_width="match_parent"
@@ -228,7 +251,7 @@
                 android:layout_width="match_parent"
                 android:layout_width="match_parent"
                 android:layout_height="@dimen/d48"
                 android:layout_height="@dimen/d48"
                 android:layout_marginLeft="@dimen/d19"
                 android:layout_marginLeft="@dimen/d19"
-                android:layout_marginTop="@dimen/d20"
+                android:layout_marginTop="@dimen/d10"
                 android:layout_marginRight="@dimen/d19"
                 android:layout_marginRight="@dimen/d19"
                 android:gravity="center_vertical"
                 android:gravity="center_vertical"
                 android:orientation="horizontal">
                 android:orientation="horizontal">
@@ -240,7 +263,7 @@
                     android:layout_weight="1"
                     android:layout_weight="1"
                     android:background="@drawable/shape_main_hos_txt_bg"
                     android:background="@drawable/shape_main_hos_txt_bg"
                     android:gravity="center"
                     android:gravity="center"
-                    android:text="设备重启"
+                    android:text="重"
                     android:textColor="@drawable/selector_bottom_btn_text_color"
                     android:textColor="@drawable/selector_bottom_btn_text_color"
                     android:textSize="16sp" />
                     android:textSize="16sp" />
 
 

+ 204 - 181
android_visiting/src/main/res/layout/visiting_activation.xml

@@ -11,229 +11,252 @@
             android:id="@+id/activation_img"
             android:id="@+id/activation_img"
             android:layout_width="match_parent"
             android:layout_width="match_parent"
             android:layout_height="match_parent"
             android:layout_height="match_parent"
-            android:background="@mipmap/activation_p_bg"
-            />
+            android:background="@mipmap/activation_p_bg" />
+
         <TextView
         <TextView
             android:id="@+id/activation_title"
             android:id="@+id/activation_title"
             android:layout_width="wrap_content"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_height="wrap_content"
+            android:layout_centerHorizontal="true"
+            android:layout_marginTop="@dimen/d56"
             android:text="请先激活设备"
             android:text="请先激活设备"
-            android:textStyle="bold"
-            android:textSize="@dimen/font_size_32"
             android:textColor="@color/white"
             android:textColor="@color/white"
-            android:layout_marginTop="@dimen/d56"
-            android:layout_centerHorizontal="true"
+            android:textSize="@dimen/font_size_32"
+            android:textStyle="bold" />
 
 
-            />
         <TextView
         <TextView
             android:id="@+id/activation_title_msg"
             android:id="@+id/activation_title_msg"
             android:layout_width="wrap_content"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_height="wrap_content"
-            android:text="设置右侧参数后激活"
-            android:textSize="@dimen/font_size_16"
-            android:textColor="@color/white"
             android:layout_below="@+id/activation_title"
             android:layout_below="@+id/activation_title"
-            android:textStyle="bold"
-            android:layout_marginTop="@dimen/d10"
             android:layout_centerHorizontal="true"
             android:layout_centerHorizontal="true"
-            />
+            android:layout_marginTop="@dimen/d10"
+            android:text="设置右侧参数后激活"
+            android:textColor="@color/white"
+            android:textSize="@dimen/font_size_16"
+            android:textStyle="bold" />
 
 
         <LinearLayout
         <LinearLayout
             android:layout_width="@dimen/d450"
             android:layout_width="@dimen/d450"
             android:layout_height="@dimen/d600"
             android:layout_height="@dimen/d600"
-            android:orientation="vertical"
-            android:gravity="center"
-            android:background="@drawable/shape_bed_bg"
             android:layout_below="@+id/activation_title_msg"
             android:layout_below="@+id/activation_title_msg"
+            android:layout_centerHorizontal="true"
             android:layout_marginTop="@dimen/d20"
             android:layout_marginTop="@dimen/d20"
             android:layout_marginRight="@dimen/d24"
             android:layout_marginRight="@dimen/d24"
-            android:layout_centerHorizontal="true"
-            android:layout_marginBottom="@dimen/d10">
+            android:layout_marginBottom="@dimen/d10"
+            android:background="@drawable/shape_bed_bg"
+            android:gravity="center"
+            android:orientation="vertical">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="@dimen/d35"
+                android:text="智能健康 关爱互联系统"
+                android:textColor="@color/black"
+                android:textSize="@dimen/font_size_20" />
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="@dimen/d10"
+                android:text="扫描二维码进行激活"
+                android:textColor="@color/black"
+                android:textSize="@dimen/font_size_16" />
+
+            <ImageView
+                android:id="@+id/activation_qr_code"
+                android:layout_width="@dimen/d160"
+                android:layout_height="@dimen/d160"
+                android:layout_marginTop="@dimen/d10" />
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="@dimen/d90"
+                android:layout_marginTop="@dimen/d10"
+                android:orientation="horizontal">
 
 
                 <TextView
                 <TextView
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:layout_height="wrap_content"
-                    android:text="智能健康 关爱互联系统"
+                    android:text="名称:"
+                    android:textColor="@color/black"
                     android:textSize="@dimen/font_size_20"
                     android:textSize="@dimen/font_size_20"
+                    android:textStyle="bold" />
+
+                <TextView
+                    android:id="@+id/app_name"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginLeft="@dimen/d10"
+                    android:textColor="@color/txt_setting"
+                    android:textSize="@dimen/font_size_18" />
+
+            </LinearLayout>
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="@dimen/d90"
+                android:layout_marginTop="@dimen/d10"
+                android:orientation="horizontal">
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="当前版本号:"
                     android:textColor="@color/black"
                     android:textColor="@color/black"
-                    android:layout_marginTop="@dimen/d35" />
+                    android:textSize="@dimen/font_size_20"
+                    android:textStyle="bold" />
+
+                <TextView
+                    android:id="@+id/activation_v"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginLeft="@dimen/d10"
+                    android:text="V--"
+                    android:textColor="@color/txt_setting"
+                    android:textSize="@dimen/font_size_18" />
+
+            </LinearLayout>
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="@dimen/d90"
+                android:layout_marginTop="@dimen/d15"
+                android:orientation="horizontal">
 
 
                 <TextView
                 <TextView
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:layout_height="wrap_content"
-                    android:text="扫描二维码进行激活"
-                    android:textSize="@dimen/font_size_16"
+                    android:text="本机IP:"
                     android:textColor="@color/black"
                     android:textColor="@color/black"
-                    android:layout_marginTop="@dimen/d10" />
+                    android:textSize="@dimen/font_size_20"
+                    android:textStyle="bold" />
 
 
-                <ImageView
-                    android:id="@+id/activation_qr_code"
-                    android:layout_width="@dimen/d160"
-                    android:layout_height="@dimen/d160"
-                    android:layout_marginTop="@dimen/d10" />
+                <TextView
+                    android:id="@+id/activation_ip"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginLeft="@dimen/d10"
+                    android:text="--"
+                    android:textColor="@color/txt_setting"
+                    android:textSize="@dimen/font_size_18" />
+
+            </LinearLayout>
 
 
-                <LinearLayout
-                    android:layout_width="match_parent"
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="@dimen/d90"
+                android:layout_marginTop="@dimen/d15"
+                android:orientation="horizontal">
+
+                <TextView
+                    android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:layout_height="wrap_content"
-                    android:orientation="horizontal"
-                    android:layout_marginTop="@dimen/d10"
-                    android:layout_marginLeft="@dimen/d90">
-
-                    <TextView
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:text="当前版本号:"
-                        android:textSize="@dimen/font_size_20"
-                        android:textColor="@color/black"
-                        android:textStyle="bold" />
-
-                    <TextView
-                        android:id="@+id/activation_v"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:text="V--"
-                        android:layout_marginLeft="@dimen/d10"
-                        android:textSize="@dimen/font_size_18"
-                        android:textColor="@color/txt_setting" />
-
-                </LinearLayout>
-
-                <LinearLayout
-                    android:layout_width="match_parent"
+                    android:text="网关:"
+                    android:textColor="@color/black"
+                    android:textSize="@dimen/font_size_20"
+                    android:textStyle="bold" />
+
+                <TextView
+                    android:id="@+id/activation_wg"
+                    android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:layout_height="wrap_content"
-                    android:orientation="horizontal"
-                    android:layout_marginLeft="@dimen/d108"
-                    android:layout_marginTop="@dimen/d15">
-
-                    <TextView
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:text="本机IP:"
-                        android:textSize="@dimen/font_size_20"
-                        android:textColor="@color/black"
-                        android:textStyle="bold" />
-
-                    <TextView
-                        android:id="@+id/activation_ip"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:text="--"
-                        android:layout_marginLeft="@dimen/d10"
-                        android:textSize="@dimen/font_size_18"
-                        android:textColor="@color/txt_setting" />
-
-                </LinearLayout>
-
-                <LinearLayout
-                    android:layout_width="match_parent"
+                    android:layout_marginLeft="@dimen/d10"
+                    android:text="--"
+                    android:textColor="@color/txt_setting"
+                    android:textSize="@dimen/font_size_18" />
+
+            </LinearLayout>
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="@dimen/d90"
+                android:layout_marginTop="@dimen/d15"
+                android:orientation="horizontal">
+
+                <TextView
+                    android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:layout_height="wrap_content"
-                    android:orientation="horizontal"
-                    android:layout_marginLeft="@dimen/d116"
-                    android:layout_marginTop="@dimen/d15">
-
-                    <TextView
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:text="网关:"
-                        android:textSize="@dimen/font_size_20"
-                        android:textColor="@color/black"
-                        android:textStyle="bold" />
-
-                    <TextView
-                        android:id="@+id/activation_wg"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:text="--"
-                        android:layout_marginLeft="@dimen/d10"
-                        android:textSize="@dimen/font_size_18"
-                        android:textColor="@color/txt_setting" />
-
-                </LinearLayout>
-
-                <LinearLayout
-                    android:layout_width="match_parent"
+                    android:text="掩码:"
+                    android:textColor="@color/black"
+                    android:textSize="@dimen/font_size_20"
+                    android:textStyle="bold" />
+
+                <TextView
+                    android:id="@+id/activation_ym"
+                    android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:layout_height="wrap_content"
-                    android:orientation="horizontal"
-                    android:layout_marginLeft="@dimen/d116"
-                    android:layout_marginTop="@dimen/d15">
-
-                    <TextView
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:text="掩码:"
-                        android:textSize="@dimen/font_size_20"
-                        android:textColor="@color/black"
-                        android:textStyle="bold" />
-
-                    <TextView
-                        android:id="@+id/activation_ym"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:text="--"
-                        android:layout_marginLeft="@dimen/d10"
-                        android:textSize="@dimen/font_size_18"
-                        android:textColor="@color/txt_setting" />
-
-                </LinearLayout>
-
-                <LinearLayout
-                    android:layout_width="match_parent"
+                    android:layout_marginLeft="@dimen/d10"
+                    android:text="--"
+                    android:textColor="@color/txt_setting"
+                    android:textSize="@dimen/font_size_18" />
+
+            </LinearLayout>
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="@dimen/d90"
+                android:layout_marginTop="@dimen/d15"
+                android:orientation="horizontal">
+
+                <TextView
+                    android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:layout_height="wrap_content"
-                    android:orientation="horizontal"
-                    android:layout_marginLeft="@dimen/d108"
-                    android:layout_marginTop="@dimen/d15">
-
-                    <TextView
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:text="注册码:"
-                        android:textSize="@dimen/font_size_20"
-                        android:textColor="@color/black"
-                        android:textStyle="bold" />
-
-                    <TextView
-                        android:id="@+id/activation_zcm"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:text="--"
-                        android:layout_marginLeft="@dimen/d10"
-                        android:textSize="@dimen/font_size_18"
-                        android:textColor="@color/txt_setting" />
-
-                </LinearLayout>
-
-                <LinearLayout
-                    android:layout_width="match_parent"
+                    android:text="注册码:"
+                    android:textColor="@color/black"
+                    android:textSize="@dimen/font_size_20"
+                    android:textStyle="bold" />
+
+                <TextView
+                    android:id="@+id/activation_zcm"
+                    android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:layout_height="wrap_content"
-                    android:orientation="horizontal"
-                    android:layout_marginLeft="@dimen/d100"
-                    android:layout_marginTop="@dimen/d15">
-
-                    <TextView
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:text="服务器IP:"
-                        android:textSize="@dimen/font_size_20"
-                        android:textColor="@color/black"
-                        android:textStyle="bold" />
-
-                    <TextView
-                        android:id="@+id/activation_fuq"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:text="--"
-                        android:layout_marginLeft="@dimen/d10"
-                        android:textSize="@dimen/font_size_18"
-                        android:textColor="@color/txt_setting" />
-
-                </LinearLayout>
+                    android:layout_marginLeft="@dimen/d10"
+                    android:text="--"
+                    android:textColor="@color/txt_setting"
+                    android:textSize="@dimen/font_size_18" />
+
+            </LinearLayout>
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="@dimen/d90"
+                android:layout_marginTop="@dimen/d15"
+                android:orientation="horizontal">
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="服务器IP:"
+                    android:textColor="@color/black"
+                    android:textSize="@dimen/font_size_20"
+                    android:textStyle="bold" />
+
+                <TextView
+                    android:id="@+id/activation_fuq"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginLeft="@dimen/d10"
+                    android:text="--"
+                    android:textColor="@color/txt_setting"
+                    android:textSize="@dimen/font_size_18" />
+
+            </LinearLayout>
 
 
             <LinearLayout
             <LinearLayout
                 android:layout_width="match_parent"
                 android:layout_width="match_parent"
                 android:layout_height="@dimen/d48"
                 android:layout_height="@dimen/d48"
                 android:layout_marginLeft="@dimen/d19"
                 android:layout_marginLeft="@dimen/d19"
-                android:layout_marginRight="@dimen/d19"
                 android:layout_marginTop="@dimen/d20"
                 android:layout_marginTop="@dimen/d20"
+                android:layout_marginRight="@dimen/d19"
                 android:layout_marginBottom="@dimen/d50"
                 android:layout_marginBottom="@dimen/d50"
                 android:gravity="center_vertical"
                 android:gravity="center_vertical"
                 android:orientation="horizontal">
                 android:orientation="horizontal">
@@ -242,10 +265,10 @@
                     android:id="@+id/activation_settings_button"
                     android:id="@+id/activation_settings_button"
                     android:layout_width="0dp"
                     android:layout_width="0dp"
                     android:layout_height="@dimen/d48"
                     android:layout_height="@dimen/d48"
+                    android:layout_weight="1"
                     android:background="@drawable/shape_main_hos_txt_bg"
                     android:background="@drawable/shape_main_hos_txt_bg"
                     android:gravity="center"
                     android:gravity="center"
-                    android:text="设备重启"
-                    android:layout_weight="1"
+                    android:text="重新启动"
                     android:textColor="@drawable/selector_bottom_btn_text_color"
                     android:textColor="@drawable/selector_bottom_btn_text_color"
                     android:textSize="20sp" />
                     android:textSize="20sp" />
 
 
@@ -273,7 +296,7 @@
                     android:textColor="@drawable/selector_bottom_btn_text_color"
                     android:textColor="@drawable/selector_bottom_btn_text_color"
                     android:textSize="20sp" />
                     android:textSize="20sp" />
             </LinearLayout>
             </LinearLayout>
-            </LinearLayout>
+        </LinearLayout>
 
 
 
 
     </RelativeLayout>
     </RelativeLayout>

+ 1 - 1
android_visiting/src/main/res/values/strings.xml

@@ -1,4 +1,4 @@
 <resources>
 <resources>
     <string name="app_name">Home</string>
     <string name="app_name">Home</string>
-    <string name="wdkl_app_name">ncs_visiting</string>
+    <string name="wdkl_app_name">NCS_VISITING</string>
 </resources>
 </resources>

+ 3 - 2
common/build.gradle

@@ -252,7 +252,7 @@ dependencies {
      */
      */
     compile 'io.netty:netty-all:4.1.42.Final'
     compile 'io.netty:netty-all:4.1.42.Final'
     //解决 引入上方库,Log4J2Logger报错的问题
     //解决 引入上方库,Log4J2Logger报错的问题
-    implementation 'org.apache.logging.log4j:log4j-core:2.7'
+    annotationProcessor 'org.apache.logging.log4j:log4j-core:2.7'
     implementation 'org.apache.logging.log4j:log4j-api:2.7'
     implementation 'org.apache.logging.log4j:log4j-api:2.7'
     /**
     /**
      * json
      * json
@@ -270,7 +270,8 @@ dependencies {
 
 
     compile project(':resource')
     compile project(':resource')
 
 
-
+    //大朝华15.6寸rk主机api
+    implementation files('libs/meiai_api.jar')
 
 
 
 
 }
 }

BIN
common/libs/meiai_api.jar


+ 32 - 1
common/src/main/code/com/wdkl/ncs/android/lib/base/BaseActivity.kt

@@ -21,6 +21,7 @@ import com.wdkl.ncs.android.lib.utils.errorLog
 import com.enation.javashop.utils.base.tool.BaseToolActivity
 import com.enation.javashop.utils.base.tool.BaseToolActivity
 import com.enation.javashop.utils.base.tool.CommonTool
 import com.enation.javashop.utils.base.tool.CommonTool
 import com.enation.javashop.utils.base.widget.LoadingDialog
 import com.enation.javashop.utils.base.widget.LoadingDialog
+import com.meiai.manager.MyManager
 import com.wdkl.ncs.android.lib.core.locale.LocaleMangerUtils
 import com.wdkl.ncs.android.lib.core.locale.LocaleMangerUtils
 import com.wdkl.ncs.android.lib.core.locale.SettingConfigNew
 import com.wdkl.ncs.android.lib.core.locale.SettingConfigNew
 import kotlinx.android.synthetic.main.custom_loading.view.*
 import kotlinx.android.synthetic.main.custom_loading.view.*
@@ -75,6 +76,10 @@ abstract class BaseActivity<PresenterType : BaseContract.BasePresenter, DataBind
                     or View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
                     or View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
                     or View.SYSTEM_UI_FLAG_FULLSCREEN)
                     or View.SYSTEM_UI_FLAG_FULLSCREEN)
 
 
+
+    var manager: MyManager? = null
+    var apiConnect = false
+
     /**
     /**
      * @author  LDD
      * @author  LDD
      * @From   com.wdkl.ncs.android.lib.base.BaseActivity
      * @From   com.wdkl.ncs.android.lib.base.BaseActivity
@@ -111,8 +116,26 @@ abstract class BaseActivity<PresenterType : BaseContract.BasePresenter, DataBind
         bindDagger()
         bindDagger()
         /**Presenter绑定View*/
         /**Presenter绑定View*/
         attachView()
         attachView()
+
         /**执行初始化操作*/
         /**执行初始化操作*/
-        init()
+        if ("A01".equals(Build.MODEL)) {
+            try {
+                manager = MyManager.getInstance(this)
+                manager?.bindAIDLService(this)
+                manager?.setConnectClickInterface {
+                    Log.e("Base", "meiai api connect...")
+                    apiConnect = true
+                    /**执行初始化操作*/
+                    init()
+                }
+            } catch (e: Exception) {
+                init()
+                //e.printStackTrace()
+            }
+        } else {
+            init()
+        }
+
         /**执行绑定event操作*/
         /**执行绑定event操作*/
         bindEvent()
         bindEvent()
     }
     }
@@ -194,6 +217,14 @@ abstract class BaseActivity<PresenterType : BaseContract.BasePresenter, DataBind
         /**处理android4.4.2 底层内存泄漏*/
         /**处理android4.4.2 底层内存泄漏*/
         //fixInputMethodManagerLeak(activity)
         //fixInputMethodManagerLeak(activity)
         errorLog("PageDestory","页面销毁======>$localClassName")
         errorLog("PageDestory","页面销毁======>$localClassName")
+
+        if ("A01".equals(Build.MODEL)) {
+            try {
+                manager?.unBindAIDLService(this)
+            } catch (e: Exception) {
+                //e.printStackTrace()
+            }
+        }
     }
     }
 
 
 
 

+ 2 - 1
welcome/src/main/code/com/wdkl/ncs/android/component/welcome/activity/WelcomeActivity.kt

@@ -87,12 +87,13 @@ class WelcomeActivity :BaseActivity<WelcomePresenter, ActivityWelcomeBinding>(),
     }
     }
 
 
     private fun requestPermissions(){
     private fun requestPermissions(){
-        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
             Observable.just("").compose(
             Observable.just("").compose(
                 RxPermissions(this).ensure(
                 RxPermissions(this).ensure(
                     Manifest.permission.CAMERA,
                     Manifest.permission.CAMERA,
                     Manifest.permission.READ_EXTERNAL_STORAGE,
                     Manifest.permission.READ_EXTERNAL_STORAGE,
                     Manifest.permission.WRITE_EXTERNAL_STORAGE,
                     Manifest.permission.WRITE_EXTERNAL_STORAGE,
+                    Manifest.permission.MANAGE_EXTERNAL_STORAGE,
                     Manifest.permission.ACCESS_WIFI_STATE,
                     Manifest.permission.ACCESS_WIFI_STATE,
                     Manifest.permission.BLUETOOTH,
                     Manifest.permission.BLUETOOTH,
                     Manifest.permission.RECORD_AUDIO,
                     Manifest.permission.RECORD_AUDIO,