当应用程序完全关闭时,我不接电话,我不知道为什么有人能帮我??我使用这段代码来安装mesibo:
Mesibo.getInstance().init(this)
Mesibo.addListener(this)
Mesibo.setRestartListener(this)
Mesibo.setSecureConnection(true)
Mesibo.setAccessToken(user?.mesiboToken)
val myProfile = UserProfile()
myProfile.name = user?.name
myProfile.address = user?.mesiboAddress
Mesibo.setDatabase("mydb", 0)
MesiboCall.getInstance().init(applicationContext)
Mesibo.setAppInForeground(this, 0, true)
Mesibo.start()
val profiles = Mesibo.getUserProfiles()
profiles.forEach { (key, profile) ->
val split = key.split("-")
if (!split.isNullOrEmpty()) {
val userProfile = UserProfile()
userProfile.name = split[0]
userProfile.address = key
Mesibo.setUserProfile(userProfile, false)
}
}
Mesibo.setPushToken(TokenManager.getInstance().getFCMToken())我还实现了所有Mesibo调用侦听器
发布于 2021-03-24 13:57:46
一旦操作系统挂起你的应用程序,它将无法运行,从而接收新的消息或调用,直到它再次被激活。因此,当应用程序有新消息或新来电时,您需要将应用程序从睡眠状态中唤醒,以便实时传递消息和呼叫。这是您需要发送推送通知的地方。推送通知唤醒应用程序,并将其从睡眠状态移动到活动状态。一旦应用程序移动到活动状态,Mesibo将自动连接并开始接收消息和呼叫。
https://stackoverflow.com/questions/66335410
复制相似问题