当前位置:网站首页>[HMS core] [FAQ] A collection of typical questions about push kit, analysis services, and video editing services 3
[HMS core] [FAQ] A collection of typical questions about push kit, analysis services, and video editing services 3
2022-07-30 15:53:00 【Huawei Developer Forum】
1、【分析服务】 【问题描述】
分析服务中,How to configure the channel name?
【解决方案】
The channel name needs to be configured manually.
参考链接如下:
2、【推送服务】【问题描述】
服务端推送消息,Defined in the message bodyintent,to open a custom link
"android": {
"notification": {
"click_action": {
"type": 1,
"intent": "intent://com.honor.push/deeplink?#Intent;scheme=pushscheme;launchFlags=0x04000000;i.age=180;S.name=abc;end"
}
}
}
其中launchFlags=0x04000000 What does the value mean?If set to other value,如0x10000000会怎么样?
【解决方案】
launchFlags=0x04000000,意思是activity的launchMode对应intent的Flag为FLAG_ACTIVITY_CLEAR_TOP,Please refer to the figure below for the specific meaning:

If other values are set,比如0x10000000,Although under normal circumstances test discovery can also be achievedFLAG_ACTIVITY_NEW_TASK的效果,但是不建议使用.
可以按照官网指导,生成intentThe application must bring the parameterIntent.FLAG_ACTIVITY_CLEAR_TOP,If this option is not added, duplicate messages may be displayed.
3、【视频编辑服务】【问题描述】
Integrated video editing services,裁剪成功后,视频异常(Video crop end,Play from the beginning after successful cropping,The playback screen freezes)
【解决方案】
Some tweaks to the code are recommended,在VideoClipsPlayFragment.java文件中,修改onPlayStateChange函数:
将
if (mEditPreviewVieModel.isPersonTrackingStatus()) {
editor.playTimeLine(mCurrentTime, mPersonTrackingViewModel.getVideoEndTime());
} else {
editor.playTimeLine(mCurrentTime, mVideoDuration);
}
修改为
if (mEditPreviewVieModel.isPersonTrackingStatus()) {
editor.seekTimeLine(mCurrentTime, () -> editor.playTimeLine(mCurrentTime, mPersonTrackingViewModel.getVideoEndTime()));
} else {
editor.seekTimeLine(mCurrentTime, () -> editor.playTimeLine(mCurrentTime, mVideoDuration));
}
4、【推送服务】【问题描述】
在项目中添加了“agconnect-services.json”文件,但无法启用agcp插件.是否是因为Android Studio版本的问题,Because in the latest version,buildscript > dependencies已经不存在了
【解决方案】
2022年2月4日 新发布的Android Studio新版本Bumblebee 2021.1.1 Patch 1以及新的gradle plugin 7.1.0,在新的gradle pluginMade some adjustments to the specification of the configuration file,If using this version and latergradle plugin,Integration can be done in the following waysHMS Core SDK.
步骤 1 打开Android Studio项目级“build.gradle”文件.
步骤 2 如果App中添加了“agconnect-services.json”文件则需要在“buildscript > dependencies”中增加agcp插件配置.
buildscript {
dependencies {
...
//gradle plugin版本,可以自己选择版本
classpath 'com.android.tools.build:gradle:7.1.0-alpha03'
// 增加agcp插件配置,推荐您使用最新版本的agcp插件.
classpath 'com.huawei.agconnect:agcp:1.6.0.300'
}
}
步骤 3 Open project level“settings.gradle”文件,配置HMS Core SDK的Maven仓地址.
pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()
maven { url 'https://developer.huawei.com/repo/' }
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url 'https://developer.huawei.com/repo/' }
}
}
更多详情,请参考链接:文档中心.
欲了解更多更全技术文章,欢迎访问https://developer.huawei.com/consumer/cn/forum/?ha_source=zzh
边栏推荐
猜你喜欢
![[Developers must see] [push kit] Collection of typical problems of push service 2](/img/70/d5127d57d2f3532deb7314d737820b.png)
[Developers must see] [push kit] Collection of typical problems of push service 2

70 lines of code, a desktop automatic translation artifact

2022最新 | 室外单目深度估计研究综述

Alluxio for Presto fu can across the cloud self-service ability

php如何查询字符串出现位置

【开发者必看】【push kit】推送服务典型问题合集2

B+树索引页大小是如何确定的?

FME实现CAD带属性转SHP数据方法

AI遮天传 DL-CNN

涨姿势了!原来这才是多线程正确实现方式
随机推荐
flask获取post请求参数
InputStream和OutputStream流的使用
Debug - Notes
动态规划 --- 状态压缩DP 详细解释
Memory-mapped, bit-band operations
Configuration - Notes
Shell脚本的概念
[Cloud native] Alibaba Cloud ARMS business real-time monitoring
【AGC】质量服务2-性能管理示例
yarn的安装及使用教程
二、判断 & 循环
经典实例分割模型Mask RCNN原理与测试
How do luxury giants such as GUCCI and LV deploy the metaverse, should other brands keep up?
How to split microservices?
TiDB 工具功能概览
HTTP缓存小结
2022最新 | 室外单目深度估计研究综述
Overview of TiDB Tool Functions
Placement Rules 使用文档
Data Analysis Tools - DDL operations & DML operations in HQL