Commit e4489644 by fengquan

fix bug mr改动

parent 06c65bdd
...@@ -12,10 +12,7 @@ import android.hardware.SensorEventListener ...@@ -12,10 +12,7 @@ import android.hardware.SensorEventListener
import android.hardware.SensorManager import android.hardware.SensorManager
import android.media.MediaPlayer import android.media.MediaPlayer
import android.net.Uri import android.net.Uri
import android.os.Build import android.os.*
import android.os.Handler
import android.os.PowerManager
import android.os.Vibrator
import android.provider.Settings import android.provider.Settings
import android.text.TextUtils import android.text.TextUtils
import android.view.View import android.view.View
...@@ -189,7 +186,7 @@ class AudioHomeActivity : ...@@ -189,7 +186,7 @@ class AudioHomeActivity :
private var mPlayer: AudioPlayer? = null private var mPlayer: AudioPlayer? = null
private var vibrator: Vibrator? = null private var vibrator: Vibrator? = null
private var handler: Handler? = null private var handler: Handler? = null
private var phone_handler: Handler? = null private var phoneHandler: Handler? = Handler(Looper.getMainLooper())
//声网 //声网
private var voiceManage: YDLVoiceManager? = null private var voiceManage: YDLVoiceManager? = null
...@@ -547,21 +544,19 @@ class AudioHomeActivity : ...@@ -547,21 +544,19 @@ class AudioHomeActivity :
.sendRichLog(AliYunLogConfig.AGORA, "主叫方发送的邀请通话消息内容:$content") .sendRichLog(AliYunLogConfig.AGORA, "主叫方发送的邀请通话消息内容:$content")
localRemainTime = (totalDuration?:1500).minus(remainTime?.toInt()?:1500) localRemainTime = (totalDuration?:1500).minus(remainTime?.toInt()?:1500)
handler = Handler() handler = Handler()
phone_handler = Handler()
vibrator = getSystemService(Service.VIBRATOR_SERVICE) as Vibrator?
vibrator = getSystemService(Service.VIBRATOR_SERVICE) as Vibrator?
var count = 0 var count = 0
phone_handler!!.postDelayed(object : Runnable { phoneHandler?.postDelayed(object : Runnable {
override fun run() { override fun run() {
if(count % 2 == 0){ if(count % 2 == 0){
tv_tips.text = "正在发送倾诉请求…" tv_tips.text = "正在发送倾诉请求…"
}else{ }else{
tv_tips.text = "正在等待聆听者接受邀请…" tv_tips.text = "正在等待聆听者接受邀请…"
} }
count++ count++
phone_handler!!.postDelayed({ this.run() }, 3000) phoneHandler?.postDelayed({ this.run() }, 3000)
} }
}, 3000) }, 3000)
...@@ -1109,7 +1104,7 @@ class AudioHomeActivity : ...@@ -1109,7 +1104,7 @@ class AudioHomeActivity :
*/ */
private fun connectSuccess() { private fun connectSuccess() {
isConnectSuccess = true isConnectSuccess = true
handler!!.removeCallbacksAndMessages(null) phoneHandler?.removeCallbacksAndMessages(null)
//通知服务端,此次通话已经接通,服务端开始订单 //通知服务端,此次通话已经接通,服务端开始订单
updateExpertStatus(false, 0) updateExpertStatus(false, 0)
...@@ -1385,7 +1380,7 @@ class AudioHomeActivity : ...@@ -1385,7 +1380,7 @@ class AudioHomeActivity :
override fun onDestroy() { override fun onDestroy() {
super.onDestroy() super.onDestroy()
uploadLog() uploadLog()
phone_handler?.removeCallbacksAndMessages(null) phoneHandler?.removeCallbacksAndMessages(null)
if (isConnectSuccess) { if (isConnectSuccess) {
uploadException("", "zhu", "108", callback = null) uploadException("", "zhu", "108", callback = null)
} }
...@@ -1393,8 +1388,8 @@ class AudioHomeActivity : ...@@ -1393,8 +1388,8 @@ class AudioHomeActivity :
handler = null handler = null
} }
if (phone_handler != null){ if (phoneHandler != null){
phone_handler = null phoneHandler = null
} }
hasUpLoadLog = false hasUpLoadLog = false
......
...@@ -68,7 +68,12 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) : ...@@ -68,7 +68,12 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) :
"6" "6"
) )
if (!item.confideId.isNullOrBlank()) { if (!item.confideId.isNullOrBlank()) {
ConfideWebServiceImpl().connectionJava(item.confideId!!.toInt(), 3, it.context as Activity, null) { ConfideWebServiceImpl().connectionJava(
item.confideId!!.toInt(),
3,
it.context as Activity,
null
) {
showDoctorDetail(item) showDoctorDetail(item)
} }
} }
...@@ -145,8 +150,13 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) : ...@@ -145,8 +150,13 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) :
shareUrl += "?id=${item.confideId}" shareUrl += "?id=${item.confideId}"
} }
val dialog = YDLShareDialog.style8( val dialog = YDLShareDialog.style8(
aty, "${item.name.get()}_${item.title.get()}", shareUrl, "壹点灵心理服务平台让天下人更快乐", item.avatar.get(), aty,
genMinProgramPath(shareUrl), "gh_25b90294ddcc" "${item.name.get()}_${item.title.get()}",
shareUrl,
"壹点灵心理服务平台让天下人更快乐",
item.avatar.get(),
genMinProgramPath(shareUrl),
"gh_25b90294ddcc"
) )
dialog.show(aty.fragmentManager, "share") dialog.show(aty.fragmentManager, "share")
} }
...@@ -201,13 +211,12 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) : ...@@ -201,13 +211,12 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) :
} }
val controller: DraweeController = Fresco.newDraweeControllerBuilder() val controller: DraweeController = Fresco.newDraweeControllerBuilder()
.setUri(Uri.parse("res://drawable/"+ R.drawable.first_order)) .setUri(Uri.parse("res://drawable/" + R.drawable.first_order))
.setOldController(binding.confideFirstFree.controller) .setOldController(binding.confideFirstFree.controller)
.setAutoPlayAnimations(true) // 是否自动播放Gif动画 .setAutoPlayAnimations(true) // 是否自动播放Gif动画
.build() .build()
binding.confideFirstFree.controller = controller binding.confideFirstFree.controller = controller
binding.seekbar.progress = 0 binding.seekbar.progress = 0
binding.seekbar.setOnSeekBarChangeListener(object : SeekBar.OnSeekBarChangeListener { binding.seekbar.setOnSeekBarChangeListener(object : SeekBar.OnSeekBarChangeListener {
override fun onProgressChanged(seekBar: SeekBar?, progress: Int, fromUser: Boolean) { override fun onProgressChanged(seekBar: SeekBar?, progress: Int, fromUser: Boolean) {
...@@ -302,7 +311,12 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) : ...@@ -302,7 +311,12 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) :
item.confideId?.let { item.confideId?.let {
val url = HttpConfig.MH5_URL + ConfideRoute.h5ConfideIntro(it) val url = HttpConfig.MH5_URL + ConfideRoute.h5ConfideIntro(it)
ConfideBottomSheetDialogFragment() ConfideBottomSheetDialogFragment()
.showBottomSheetDialog(itemView.context as FragmentActivity, url, item.doctorId!!, uid = item.uid) .showBottomSheetDialog(
itemView.context as FragmentActivity,
url,
item.doctorId!!,
uid = item.uid
)
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment