发送消息时请求发送状态
var message:Message = Message()
message.addBody("EN",msg_text.text.toString())
Log.i("Delivery Request id ",DeliveryReceiptRequest.addTo(message))
Log.v("Chat Response msg ",chat.send(message).toString())
DeliveryReceiptListener
//投递状态收件人
var deliveryReceiptManager= DeliveryReceiptManager.getInstanceFor(connection)
deliveryReceiptManager.autoReceiptMode = DeliveryReceiptManager.AutoReceiptMode.always
deliveryReceiptManager.autoAddDeliveryReceiptRequests()
deliveryReceiptManager.addReceiptReceivedListener { fromJid, toJid, receiptId, receipt ->
Log.i("From jid ",fromJid.toString())
Log.i("To jid ",toJid.toString())
Log.i("Receipt id ",receiptId.toString())
Log.i("recipt ",receipt.toString())
}
我无法获得交付状态,即收到读取/未读/消息。我将如何实现这一目标?