-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
【Android】关于使用\文档问题 #12
Comments
导入报了个初始化的错,类型不对,1.4.4版 |
上面报错看了源码的打包只保留这两个平台就好了。 |
对的, 如果需要全局使用的话,需要把创建的DataReporter对象保存为全局对象,一般是使用单例的形式。然后在各处需要上报的时候,直接调用push,把数据打进去。 |
还有个问题,一般挂时间久了全局对象可能被回收了。 |
纠正一点,全局对象不会被回收,回收的只是activity,全局对象不会被回收。除非整个进程被kill掉。 |
关于使用有几点疑惑:
看了demo的代码,还是有点疑惑,
一般以为使用是这样的,启动统一初始化DataReporter(相关设置)、在各处需要上传的时候添加到上报队列、上报(处理回调)
疑问在第二点添加上报数据哪里,初始化的时候把DataReporter设置为全局对象,添加直接拿到对象添加吗?
The text was updated successfully, but these errors were encountered: