|
@@ -1,6 +1,8 @@
|
|
package com.wdkl.app.ncs.callingdoor.fragment
|
|
package com.wdkl.app.ncs.callingdoor.fragment
|
|
|
|
|
|
import android.app.zhyl.ZhylManager
|
|
import android.app.zhyl.ZhylManager
|
|
|
|
+import android.content.Intent
|
|
|
|
+import android.net.wifi.WifiManager
|
|
import android.os.Build
|
|
import android.os.Build
|
|
import android.text.TextUtils
|
|
import android.text.TextUtils
|
|
import android.view.View
|
|
import android.view.View
|
|
@@ -96,6 +98,7 @@ class QrCodeFragment : BaseFragment<QrCodeFragmentPresenter, QrCodeLayBinding>()
|
|
|
|
|
|
if ("mk_h10_a133_1".equals(BuildConfig.APP_DEVICE_TYPE)) {
|
|
if ("mk_h10_a133_1".equals(BuildConfig.APP_DEVICE_TYPE)) {
|
|
tv_device_call_config.visibility = View.VISIBLE
|
|
tv_device_call_config.visibility = View.VISIBLE
|
|
|
|
+ tv_btn_wifi_config.visibility = View.VISIBLE
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -168,6 +171,17 @@ class QrCodeFragment : BaseFragment<QrCodeFragmentPresenter, QrCodeLayBinding>()
|
|
}.start()
|
|
}.start()
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ tv_btn_wifi_config.setOnClickListener {
|
|
|
|
+ PasswordDialogHelper.showPasswordDialog(activity) {
|
|
|
|
+ val intentWifi = Intent(WifiManager.ACTION_PICK_WIFI_NETWORK) // WIFI网络
|
|
|
|
+ intentWifi.putExtra("only_access_points", true);
|
|
|
|
+ intentWifi.putExtra("extra_prefs_show_button_bar", true) // 展示返回按钮
|
|
|
|
+ intentWifi.putExtra("extra_prefs_set_back_text", "Back") // 设置文字
|
|
|
|
+ intentWifi.putExtra("extra_prefs_set_next_text", "") // 隐藏下一步的按钮
|
|
|
|
+ startActivityForResult(intentWifi, 11)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
view_qr_code.setOnClickListener {
|
|
view_qr_code.setOnClickListener {
|
|
if (System.currentTimeMillis() - clickTime < 1500) {
|
|
if (System.currentTimeMillis() - clickTime < 1500) {
|
|
clickCount++
|
|
clickCount++
|