|
|
package com.br_technology.securitytrain_master.ui.mine.activity
|
|
|
|
|
|
import android.Manifest
|
|
|
import android.content.Intent
|
|
|
import android.net.Uri
|
|
|
import com.br_technology.securitytrain_master.databinding.ActivityServiceBinding
|
|
|
import com.br_technology.securitytrain_master.ext.initPermissions
|
|
|
import com.br_technology.securitytrain_master.ui.home.viewmodel.ServiceViewModel
|
|
|
import com.wjx.android.wanandroidmvvm.base.view.BaseLifeCycleActivity
|
|
|
|
...
|
...
|
@@ -16,7 +20,21 @@ class ServiceActivity : |
|
|
|
|
|
binding.apply {
|
|
|
// 拨打电话
|
|
|
call.setOnClickListener { }
|
|
|
call.setOnClickListener {
|
|
|
initPermissions(Manifest.permission.CALL_PHONE,
|
|
|
onGranted = {
|
|
|
val intent = Intent()
|
|
|
intent.setAction(Intent.ACTION_CALL)
|
|
|
intent.setData(Uri.parse("tel:" + mobile.text.toString().trim()))
|
|
|
startActivity(intent)
|
|
|
},
|
|
|
onDenied = {
|
|
|
|
|
|
},
|
|
|
onDeniedNever = {
|
|
|
//跳转到设置页面
|
|
|
})
|
|
|
}
|
|
|
// 下载二维码
|
|
|
download.setOnClickListener { }
|
|
|
}
|
...
|
...
|
|