|
@@ -85,10 +85,10 @@ class WatchHomeActivity : BaseActivity<WatchHomeActivityPresenter, WatchActivity
|
|
|
watch_role_name_tv.text = Constants.user_role_name
|
|
|
}
|
|
|
|
|
|
- //开始ping网络,30秒ping一次
|
|
|
- NetHelper.startNetCheck()
|
|
|
- //SIP准备工作
|
|
|
- initSip()
|
|
|
+// //开始ping网络,30秒ping一次
|
|
|
+// NetHelper.startNetCheck()
|
|
|
+// //SIP准备工作
|
|
|
+// initSip()
|
|
|
|
|
|
wifiManager = (applicationContext.getSystemService(Context.WIFI_SERVICE)) as WifiManager
|
|
|
teleManager = (applicationContext.getSystemService(Context.TELEPHONY_SERVICE)) as TelephonyManager
|
|
@@ -146,7 +146,7 @@ class WatchHomeActivity : BaseActivity<WatchHomeActivityPresenter, WatchActivity
|
|
|
override fun destory() {
|
|
|
unRegReceiver()
|
|
|
SpeechUtil.getInstance().release()
|
|
|
- SipHelperUtil.getInstance(this).unRegisterSip()
|
|
|
+// SipHelperUtil.getInstance(this).unRegisterSip()
|
|
|
// SipHelper.getInstance().unRegisterSip()
|
|
|
if(batteryBroadcastReceiver != null){
|
|
|
unregisterReceiver(batteryBroadcastReceiver)
|
|
@@ -291,12 +291,12 @@ class WatchHomeActivity : BaseActivity<WatchHomeActivityPresenter, WatchActivity
|
|
|
}else if(messageEvent.tag == Constants.EVENT_WIFI_RSSI){
|
|
|
var message = messageEvent.getMessage() as Int
|
|
|
if(10< message && message < 20){
|
|
|
- electric_quantity_tv.setTextColor(Color.parseColor("#FF3030"))
|
|
|
+ battery_warning_tv.setTextColor(Color.parseColor("#FF3030"))
|
|
|
battery_warning_tv.visibility = View.VISIBLE
|
|
|
battery_warning_tv.text = "低电量,请注意充电"
|
|
|
|
|
|
}else if(10 > message){
|
|
|
- electric_quantity_tv.setTextColor(Color.parseColor("#8B2323"))
|
|
|
+ battery_warning_tv.setTextColor(Color.parseColor("#8B2323"))
|
|
|
battery_warning_tv.visibility = View.VISIBLE
|
|
|
battery_warning_tv.text = "电量过低,请充电"
|
|
|
}else{
|
|
@@ -334,18 +334,19 @@ class WatchHomeActivity : BaseActivity<WatchHomeActivityPresenter, WatchActivity
|
|
|
|
|
|
//界面呈现
|
|
|
AppTool.Time.delay(300) {
|
|
|
-// var intent = Intent()
|
|
|
-// intent.setClass(this, RTCVoipAudioRingingActivity::class.java)
|
|
|
-// intent.putExtra("targetId", interactionVO.fromSipId)
|
|
|
-// intent.putExtra("TcpModel", tcpModel)
|
|
|
-// startActivity(intent)
|
|
|
-
|
|
|
- //sip
|
|
|
+ //rtc
|
|
|
var intent = Intent()
|
|
|
- intent.setClass(this, SipVoipAudioRingingActivity::class.java)
|
|
|
+ intent.setClass(this, RTCVoipAudioRingingActivity::class.java)
|
|
|
intent.putExtra("targetId", interactionVO.fromSipId)
|
|
|
intent.putExtra("TcpModel", tcpModel)
|
|
|
startActivity(intent)
|
|
|
+
|
|
|
+ //sip
|
|
|
+// var intent = Intent()
|
|
|
+// intent.setClass(this, SipVoipAudioRingingActivity::class.java)
|
|
|
+// intent.putExtra("targetId", interactionVO.fromSipId)
|
|
|
+// intent.putExtra("TcpModel", tcpModel)
|
|
|
+// startActivity(intent)
|
|
|
}
|
|
|
}
|
|
|
} else if (tcpModel.getAction() === TcpAction.VoiceAction.HANDOFF) { //对方挂断,不论我方呼出或呼入
|
|
@@ -385,7 +386,7 @@ class WatchHomeActivity : BaseActivity<WatchHomeActivityPresenter, WatchActivity
|
|
|
if (wifiManager != null && netType == NetHelper.NETWORK_WIFI) {
|
|
|
val wifiInfo = wifiManager.getConnectionInfo()
|
|
|
val wifi = wifiInfo.getRssi ();//获取wifi信号强度
|
|
|
- Log.e(TAG,"wifi 信号强度"+wifi)
|
|
|
+// Log.e(TAG,"wifi 信号强度"+wifi)
|
|
|
|
|
|
if (wifi > -50 && wifi < 0) {//最强
|
|
|
// Log.e(TAG, "wzlll 最强")
|