当前位置:网站首页>[Developers must see] [push kit] Collection of typical problems of push service service 2
[Developers must see] [push kit] Collection of typical problems of push service service 2
2022-08-09 04:49:00 【Huawei Developer Forum】
1. After adding Huawei sdk com.huawei.hms:push:5.3.0.301, an error is reported when compiling?
Answer: If the application already contains com.tencent.tpns:huawei to encapsulate Huawei push, and the integrated compilation will conflict, you need to comment out 'com.tencent.tpns:huawei:1.2.1.2-release' and recompile
2. After the user receives multiple pushes, after clicking a message in the notification bar, other messages are eliminated. This is not the case for other apps. Is it a setting problem?
Answer: Please check whether there is a logic code (not a function provided by Huawei Push) to clear the notification bar message in the application in the several interfaces where you click on the message to jump, such as:
NotificationManager manager = (NotificationManager) this.getSystemService(Context.NOTIFICATION_SERVICE);manager.cancelAll();
3. The client changes the corner logo
private void clearBadge(Application application, int number){ String packageName = application.getPackageName(); Bundle bundle = new Bundle(); bundle.putString("package", packageName); ComponentName launchClassComponent = application.getPackageManager().getLaunchIntentForPackage(packageName).getComponent(); if (launchClassComponent == null) { return; } String launchClassName = launchClassComponent.getClassName(); bundle.putString("class", launchClassName); bundle.putInt("badgenumber", number); try { Bundle result = application.getContentResolver().call(Uri.parse("content://com.huawei.android.launcher.settings/badge/"), "change_badge", null, bundle); Log.i(TAG, "clearBadge result = " + result); } catch (Exception e) { Log.i(TAG, "clearBadge error "); } }
4. Open the push service but the AppKey and APP Secret are not found?
Answer: App Secret and AppKey have been renamed to Client Secret and Client ID in OAuth2.0 Client ID
5. Push message 502 error?
Scenario (test environment) 1: Please provide detailed log information. After connecting to the phone using adb, execute the following commands:
adb shell setprop log.tag.hwpush VERBOSE
adb logcat -v threadtime 1> D:\hwpush.log
Try to reproduce the problem scenario you encountered, and press the shortcut key "Ctrl+C" to complete the log capture.
At the same time, please record the device model, EMUI version number, HMS Core (APK) version number, integrated push service SDK version number, and steps to reproduce the problem as much as possible, so that we can solve the problem for you faster.technical positioning.
Scenario (live network environment) 2: [Problem description] The push server api sends messages. During 7:00-7:40 on November 15th, a large number of messages failed to be pushed, and the error 502 Bad Gateway was reported.
[Cause] The Auth server failed, which caused the obtained access_token to fail to authenticate when sending the message, resulting in a 502 error
[Solution] At present, the fault has been solved and the function of the service has been restored, please try again.
This answer is an operation reply, it has been guessed to be a bug of the current network before
For more technical articles, please visit https://developer.huawei.com/consumer/cn/forum/?ha_source=zzh
边栏推荐
- ceph create pool, map, delete exercises
- 2022 Security Officer-A Certificate Special Work Permit Exam Question Bank and Online Mock Exam
- php使用phpoffice/phpspreadsheet导入导出excel表格
- Golang 常见知识点整理
- pytorch implementation of Poly1CrossEntropyLoss
- 稳定性测试怎么做,这篇文章彻底讲透了!
- npm package.json
- 2022 High-altitude installation, maintenance, and demolition exam practice questions and mock exams
- 阿里云天池大赛赛题(机器学习)——天猫用户重复购买预测(完整代码)
- 说明高级语言、汇编语言、机器语言三者的区别,谈谈你对汇编语言的认识。
猜你喜欢
随机推荐
MySQL: Intent Shared Locks and Intentional Exclusive Locks | Deadlocks | Lock Optimization
Alibaba Cloud Tianchi Contest Question (Machine Learning) - Prediction of Industrial Steam Volume (Complete Code)
【Harmony OS】【ARK UI】公共事件模块
pr22.5最新版下载地址
杰理之播歌曲前后音量大小不一样【篇】
2022高压电工考试试题及答案
【HMS core】【Ads Kit】Huawei Advertising——Overseas applications are tested in China. Official advertisements cannot be displayed
A GDAL API version must be specified. Provide a path to gdal-config using a GDAL_CONFIG environment
Ridge regression and LASSO regression
GraalVM安装
全栈代码测试覆盖率及用例发现系统的建设和实践
区别如下概念:助记符、汇编语言、汇编语言程序和汇编程序。
杰理之ANC OFF语音没有作用【篇】
【OpenCV】-查找并绘制轮廓
Alibaba Cloud Tianchi Contest Question (Machine Learning) - Repeat Purchase Prediction of Tmall Users (Complete Code)
【Harmony OS】【ARK UI】Public Event Module
HP路由器和交换机日志分析
The influence law of genes for disease - read the paper
【暑期每日一题】洛谷 P1176 路径计数2
How to do the stability test, this article thoroughly explains it!