Make it easier to collect & analytic data with different third party service.
dependencies {
// add dependency, please replace x.y.z to the latest version
implementation "com.xueqiu.eventlogger:eventlogger:x.y.z"
// if you use umeng analytics
implementation "com.xueqiu.eventlogger:umeng:x.y.z"
}
Before you use the library, please read relevant documents.
Initialize the ELog in the proper place.
val options = EventLogOptions()
.isDebug(BuildConfig.DEBUG)
.withLogger(xxxLogger)
ELog.init(this, options)
Then create the event.
val event = LogEvent(category, action, target, page, source)
event.extra = mExtra
ELog.log(this, event)
Register the umeng analytics.
withHandler(UmengEventLogger(umengAppKey, installChannel))
Umeng:
-keep class com.umeng.** {*;}
For more details, please read the example or source code.