1.添加依赖
implementation ’com.jew.tech.android:traffic-analysis:1.0.0-SNAPSHOT‘
2.application中初始化
class App : Application() {
override fun onCreate() {
super.onCreate()
TASDKInstaller.install(this,true)
}
}
3.开始监控
TASDK.with(applicationContext).startCapture(this) { apps -> } //activity中调用
4.停止监控
TASDK.with(applicationContext).stopCapture()
-keep class com.jew.traffic_analysis.**{*;}