appgalleryconnect / agc-android-demos Goto Github PK
View Code? Open in Web Editor NEWThis repository including all of exsiting demos of AppGallery Connect Service in Android.
License: Apache License 2.0
This repository including all of exsiting demos of AppGallery Connect Service in Android.
License: Apache License 2.0
版本:'com.android.tools.build:gradle:7.4.2'
gradle-wrapper.properties中gradle版本gradle-8.1.1-all
编译失败:
A problem occurred configuring project ':app'.
Could not create task ':app:transformClassesWithAPMSPluginForDebug'.
> Cannot use @TaskAction annotation on method IncrementalTransformTask.transform() because interface org.gradle.api.tasks.incremental.IncrementalTaskInputs is not a valid parameter to an action method.
用户同意隐私协议之后,通过查看日志发现APM没有立即采集数据,必须调用start方法才开始调用
APMS.getInstance().enableCollection(true)
APMS.getInstance().enableAnrMonitor(true)
APMS.getInstance().start(applicationContext)
想问一下这么写可不可以,是否会触发内存泄漏等问题
配置APM后,使用Hook工具,发现在用户同意隐私协议之前,APM内部调用了小米推送SDK的代码,获取了一次AndroidID,属于不合规,怎么处理?
项目的Gradle
dependencies{
implementation 'com.huawei.agconnect:agconnect-core:1.6.5.300'
implementation ('com.huawei.agconnect:agconnect-apms:1.5.2.310') {
exclude group: 'com.android.installreferrer'
}
}
buildscript {
dependencies {
classpath 'com.huawei.agconnect:agcp:1.6.5.300'
}
}
App的Gradle
apply plugin: 'com.huawei.agconnect'
agcp { // 华为agcp
enableAPMS false
}
class CoreApplication : MultiDexApplication() {
init {
APMS.getInstance().enableCollection(false)
APMS.getInstance().enableAnrMonitor(false)
}
}
2022-06-01 09:44:09.037 I/com.huawei.agc.apms: begin to register native anr methods.
2022-06-01 09:44:09.037 I/com.huawei.agc.apms: create an anr event notifier: 66.
2022-06-01 09:44:09.037 I/com.huawei.agc.apms: register own signal(sigquit) handler: 0
2022-06-01 09:44:09.039 I/com.huawei.agc.apms: waiting for anr happen, block here...
2022-06-01 09:44:09.051 D/com.huawei.agc.apms: Creating a new Non sampled Session: 3f256de11e1b4b2ba6dcaba58a2b409c
2022-06-01 09:44:09.051 D/com.huawei.agc.apms: Creating a new Non sampled Session: 2446aa840cf74b44b5ae167d1a4403cc
2022-06-01 09:44:09.052 I/com.huawei.agc.apms: APMS v1.5.2.310
2022-06-01 09:44:09.052 D/com.huawei.agc.apms: collector will start when app in foreground.
2022-06-01 09:44:10.690 D/com.huawei.agc.apms: APMS: application foregrounded.
2022-06-01 09:44:10.690 I/com.huawei.agc.apms: APMS v1.5.2.310
2022-06-01 09:44:10.690 D/com.huawei.agc.apms: starting collector with period 60000ms.
2022-06-01 09:44:10.690 D/com.huawei.agc.apms: foregroundStartTime: 1654047850690
2022-06-01 09:44:10.691 D/com.huawei.agc.apms: tick took 0ms.
2022-06-01 09:44:10.793 I/com.huawei.agc.apms: APMS: disable collection by user.
2022-06-01 09:44:10.793 D/com.huawei.agc.apms: collector stopped.
2022-06-01 09:44:11.003 I/HiAnalyticsSDK: InitTask=> Instance config init success. tag: APMS
2022-06-01 09:44:07.833 10371-10371/? I/VClientImpl: Xposed is enabled.
2022-06-01 09:44:14.273 10371-10484/? I/Xposed: 调用Settings.Secure.getstring获取了android_id
2022-06-01 09:44:14.274 10371-10484/? I/Xposed: dalvik.system.VMStack.getThreadStackTrace(Native Method)
de.robv.android.xposed.DexposedBridge.handleHookedArtMethod(DexposedBridge.java:265)
me.weishu.epic.art.entry.Entry.onHookObject(Entry.java:69)
me.weishu.epic.art.entry.Entry.referenceBridge(Entry.java:186)
com.xiaomi.push.j.c(Unknown Source:27)
com.xiaomi.push.j.j(Unknown Source:3)
com.xiaomi.mipush.sdk.b$a.a(Unknown Source:31)
com.xiaomi.mipush.sdk.b$a.a(Unknown Source:4)
com.xiaomi.mipush.sdk.b.c(Unknown Source:2)
com.xiaomi.mipush.sdk.MiPushClient.getRegId(Unknown Source:4)
java.lang.reflect.Method.invoke(Native Method)
com.huawei.hms.analytics.at.lmn(Unknown Source:17)
com.huawei.hms.analytics.bl.getPushTokenEventJson(Unknown Source:171)
com.huawei.hms.analytics.framework.c.c.a(Unknown Source:12)
com.huawei.hms.analytics.framework.c.h.run(Unknown Source:39)
com.huawei.hms.analytics.framework.f.a$a.run(Unknown Source:4)
java.util.concurrent.ThreadPoolExecutor.processTask(ThreadPoolExecutor.java:1187)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
java.lang.Thread.run(Thread.java:784)
我替换了appid,更新了json之后;后台的CPU、网络数据都有展示;
当我使用demo里的触发anr的按钮,系统也弹出了anr弹框,但是后台没有数据
gradle配置
agcp {
enableAPMS false
}
Application.onCreate方法
APMS.getInstance().enableCollection(false)
APMS.getInstance().enableAnrMonitor(false)
当我在首次安装app且首次打开app,在用户同意隐私协议之前,日志信息里有ANR监听和开始收集的log;
这是否已经在收集用户信息了,是否会对App合规造成影响?
2022-05-13 17:32:33.254 22344-22344/com.xxx.xxx D/com.huawei.agc.apms: using app packageId com.xxx.xxx
2022-05-13 17:32:33.255 22344-22344/com.xxx.xxx D/com.huawei.agc.apms: using application version xxx
2022-05-13 17:32:33.255 22344-22344/com.xxx.xxx D/com.huawei.agc.apms: using application versionCode xxx
2022-05-13 17:32:33.255 22344-22344/com.xxx.xxx D/com.huawei.agc.apms: using application name xxx
2022-05-13 17:32:33.260 22344-22344/com.xxx.xxx I/com.huawei.agc.apms: begin to register native anr methods.
2022-05-13 17:32:33.260 22344-22344/com.xxx.xxx I/com.huawei.agc.apms: create an anr event notifier: 77.
2022-05-13 17:32:33.260 22344-22344/com.xxx.xxx I/com.huawei.agc.apms: register own signal(sigquit) handler: 0
2022-05-13 17:32:33.260 22344-25051/com.xxx.xxx I/com.huawei.agc.apms: waiting for anr happen, block here...
2022-05-13 17:32:33.264 22344-22344/com.xxx.xxx D/com.huawei.agc.apms: Creating a new Non sampled Session: e0a4f4411078445e82c776031ba65969
2022-05-13 17:32:33.264 22344-22344/com.xxx.xxx D/com.huawei.agc.apms: Creating a new Non sampled Session: 17b1bc1c03e44b29b0e8c3c33e2ebb75
2022-05-13 17:32:33.266 22344-22344/com.xxx.xxx I/com.huawei.agc.apms: APMS v1.5.2.310
2022-05-13 17:32:33.266 22344-22344/com.xxx.xxx D/com.huawei.agc.apms: collector will start when app in foreground.
2022-05-13 17:32:33.939 22344-25109/com.xxx.xxx D/com.huawei.agc.apms: APMS: application foregrounded.
2022-05-13 17:32:33.939 22344-25109/com.xxx.xxx I/com.huawei.agc.apms: APMS v1.5.2.310
2022-05-13 17:32:33.939 22344-25109/com.xxx.xxx D/com.huawei.agc.apms: starting collector with period 60000ms.
2022-05-13 17:32:33.939 22344-25109/com.xxx.xxx D/com.huawei.agc.apms: foregroundStartTime: 1652434353939
2022-05-13 17:32:33.939 22344-25110/com.xxx.xxx D/com.huawei.agc.apms: tick took 0ms.
2022-05-13 17:32:34.024 22344-22344/com.xxx.xxx I/com.huawei.agc.apms: APMS: disable collection by user.
2022-05-13 17:32:34.025 22344-22344/com.xxx.xxx D/com.huawei.agc.apms: collector stopped.
2022-05-13 17:32:34.242 22344-25055/com.xxx.xxx I/HiAnalyticsSDK: InitTask=> Instance config init success. tag: APMS
看完Cloud DB文档:
https://developer.huawei.com/consumer/cn/doc/development/AppGallery-connect-Guides/agc-clouddb-get-started-0000001127676473
有几个问题,帮忙答复下, 不然感觉无法咋真实的环境下使用
I am currently on Gradle 7.3.1.
This becomes an issue in Gradle 8.0
When I apply the plugin: apply plugin: 'com.huawei.agconnect'
API 'android.registerTransform' is obsolete.
It will be removed in version 8.0 of the Android Gradle plugin.
The Transform API is removed to improve build performance. Projects that use the
Transform API force the Android Gradle plugin to use a less optimized flow for the
build that can result in large regressions in build times. It’s also difficult to
use the Transform API and combine it with other Gradle features; the replacement
APIs aim to make it easier to extend the build without introducing performance or
correctness issues.
There is no single replacement for the Transform API—there are new, targeted
APIs for each use case. All the replacement APIs are in the
androidComponents {}
block.
The Transform API uses incremental APIs deprecated since Gradle 7.5. Please add
android.experimental.legacyTransform.forceNonIncremental=true
to
gradle.properties
to fix this issue. Note that this will run transforms
non-incrementally and may have a build performance impact.
For more information, see https://developer.android.com/studio/releases/gradle-plugin-api-updates#transform-api.
To determine what is calling android.registerTransform, use -Pandroid.debug.obsoleteApi=true on the command line to display more information.
Affected Modules: app
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.