fixed conflict

This commit is contained in:
lixiaopeng
2021-10-29 15:03:24 +08:00
parent 53d6fa24ac
commit 59c5d66cfe
4 changed files with 75 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
package com.mogo.eagle.core.data.notice
import androidx.annotation.Keep
/**
* @description 普通公告数据类型
*
* @author lixiaopeng
* @since 2021/10/29
*/
@Keep
data class NoticeNormalData(
var appIcon: String = "", //目标app icon图标地址
var title: String = "", //标题
var content: String = "", //内容
var dbId: String = "", //公告id
var imageUrl: String = "", //图片地址
var videoUrl: String = "", //视频地址
var fileType: Int = 0, // 1图片2视频
val tts: String = "", //语音播报词
val speedLimit: Int = 0, //超过速度后延迟显示
var showTimeout: Int = 0, //显示等待时长
var showTimeoutShadow: Int = 0, // 显示等待时长备份
var QRCode: String = "", //二维码地址
var mainSchema: String = "", //schema跳转协议
val mainVoiceCmd: List<String>? = null, //触发主schema 命令词
val cancelVoiceCmd: List<String>? = null, //隐藏当前push命令词
val buttons: List<Button>? = null, //底部buttons列表
var timestamp: Long = System.currentTimeMillis()
)
data class Button(
val text: String = "", // button名称
val action: String = "", //scheme 协议
val voiceCmd: List<String>? = null //注册命令词
)

View File

@@ -0,0 +1,22 @@
package com.mogo.eagle.core.data.notice
import androidx.annotation.Keep
/**
* @description 普通公告详情
*
* @author lixiaopeng
* @since 2021/10/29 TODO 等待服务端定接口
*/
@Keep
data class NoticeNormalDetailData(
var appIcon: String = "", //目标app icon图标地址
var title: String = "", //标题
var content: String = "", //内容
var dbId: String = "", //公告id
var imageUrl: String = "", //图片地址
var videoUrl: String = "", //视频地址
var fileType: Int = 0, // 1图片2视频
val tts: String = "", //语音播报词
)

View File

@@ -1,5 +1,6 @@
package com.mogo.eagle.core.function.api.notice;
import com.mogo.eagle.core.data.notice.NoticeNormalData;
import com.mogo.eagle.core.data.notice.NoticePushData;
import com.mogo.eagle.core.function.api.base.IMoGoFunctionProvider;
@@ -16,4 +17,12 @@ public interface IMoGoNoticeProvider extends IMoGoFunctionProvider {
* @param pushData 推送消息体
*/
void showNoticeForTrafficWithData(NoticePushData pushData);
/**
* 呈现普通公告顶部弹框
*
* @param normalData 推送消息体
*/
void showNoticeNormalData(NoticeNormalData normalData);
}

View File

@@ -2,6 +2,7 @@ package com.mogo.eagle.core.function.call.hmi
import com.mogo.eagle.core.data.constants.MogoServicePaths
import com.mogo.eagle.core.data.enums.WarningDirectionEnum
import com.mogo.eagle.core.data.notice.NoticeNormalData
import com.mogo.eagle.core.data.notice.NoticePushData
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWaringProvider
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener
@@ -137,5 +138,12 @@ object CallerHmiManager : CallerBase() {
noticeProviderApi.showNoticeForTrafficWithData(pushData)
}
/**
* 普通公告弹窗
*
*/
fun showNormalBanner(noticeNormal: NoticeNormalData) {
noticeProviderApi.showNoticeNormalData(noticeNormal)
}
}