你好,请看 handler 包下的 LCIMMessageHandler 这个类。

1、所有的消息,都会在里面的 onMessage() 回调里接受。
2、里面有 2 个 sendNotification() 和 getIMNotificationIntent() 方法,前者是用来发通知的,后者是用来设置跳转页面时的 intent。

另外,也建议您通读一下实时通讯文档,会帮助你更快地理解我们的即时通讯:
https://leancloud.cn/docs/realtime_v2.html13
https://leancloud.cn/docs/realtime_guide-android.html9