This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
这是WeNext Android框架的推送服务模块,提供统一的推送消息管理。当前版本主要基于Firebase Cloud Messaging (FCM)实现。
IPushService: 推送服务核心接口,定义token获取、消息处理等主要功能IPushServiceConfig: 配置接口,业务层需实现此接口来提供网络服务和消息处理回调PushService: 推送服务的单例实现,基于BaseFrameWeNextFirebaseMessagingService: FCM消息接收服务,继承FirebaseMessagingServicePushMessage: 统一的推送消息数据结构RegisterTokenReq/RegisterTokenRes: token上报的请求和响应模型PushHttpService: 基于Retrofit的HTTP服务接口,用于token上报val pushService: IPushService by lazy { PushService() }
模块通过IPushServiceConfig接口获取依赖:
INetworkService)frame:base: 提供BaseFrame基础类和状态管理frame:network: 提供网络服务接口frame:log: 日志记录frame:coroutine: 协程支持在Constants.kt中定义了推送消息的关键字段:
KEY_PUSH_ID: 推送IDKEY_PUSH_MESSAGE_TYPE: 消息类型KEY_PUSH_DEEPLINK: 深链接KEY_PUSH_TITLE: 推送标题KEY_PUSH_MESSAGE: 推送内容必须先调用pushService.init(serviceConfig)进行初始化,传入实现了IPushServiceConfig的配置对象。
af-uinstall-tracking)