wjc
2023-04-06 75a2f82f91d6568c0b3ea60ea93086e65f8a2e49
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package ezviz.ezopensdkcommon.configwifi
 
import android.content.Intent
import android.os.Bundle
import android.text.TextUtils
import android.view.View
import ezviz.ezopensdkcommon.R
import ezviz.ezopensdkcommon.common.IntentConstants
import ezviz.ezopensdkcommon.common.RootActivity
import kotlinx.android.synthetic.main.activity_manual_input_device_hotspot_info.*
 
class ManualInputDeviceHotspotInfoActivity : RootActivity() {
 
    private val mEzvizDeviceHotspotPrefix = "EZVIZ_"
 
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_manual_input_device_hotspot_info)
    }
 
    fun onClickNext(view: View){
        var deviceHotspotName = app_common_device_hotspot_name.text.toString()
        var deviceHotspotPwd = app_common_device_hotspot_pwd.text.toString()
        if (TextUtils.isEmpty(deviceHotspotName)){
            deviceHotspotName = mEzvizDeviceHotspotPrefix + intent.getStringExtra(IntentConstants.DEVICE_SERIAL)
        }
//        if (TextUtils.isEmpty(deviceHotspotPwd)){
//            deviceHotspotPwd = mEzvizDeviceHotspotPrefix + intent.getStringExtra(IntentConstants.DEVICE_VERIFY_CODE)
//        }
        val jumpIntent = Intent(this, ConfigWifiExecutingActivity::class.java)
        jumpIntent.putExtras(intent)
        jumpIntent.putExtra(IntentConstants.DEVICE_HOTSPOT_SSID, deviceHotspotName)
        jumpIntent.putExtra(IntentConstants.DEVICE_HOTSPOT_PWD, deviceHotspotPwd)
        startActivity(jumpIntent)
    }
 
}