AudioImIn.kt 1007 Bytes
Newer Older
严久程 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
package com.ydl.audioim.router

import com.ydl.ydlcommon.modular.ModularServiceManager
import com.yidianling.im.api.bean.IMRegisterObserverCustomNotificationCallBack
import com.yidianling.im.api.bean.IMSendCustomNotificationResultCallBack
import com.yidianling.im.api.service.IImService


/**
 * @author jiucheng
 * @描述:
 * @Copyright Copyright (c) 2018
 * @Company 壹点灵
 * @date 2020/4/21
 */
object AudioImIn {
    private fun getImService(): IImService {
        return ModularServiceManager.provide(IImService::class.java)
    }

    /**
     * 发送自定义通知
     */
    fun sendCustomNotification(toUid: String, content: String, callback: IMSendCustomNotificationResultCallBack) {
        getImService().sendCustomNotification(toUid, content, callback)
    }

    /**
     * 注册自定通知接收器
     */
    fun registerObserveCustomNotification(callback: IMRegisterObserverCustomNotificationCallBack) {
        getImService().registerObserveCustomNotification(callback)
    }
}