主题×
Implement lifecycle
This information helps you implement Lifecycle metrics for Android.
对于 iOS,将自动收集生命周期量度。
For the metrics and dimensions that can be measured automatically by the mobile library after lifecycle is implemented, see
Lifecycle Metrics
.
iOS
在iOS中,生命周期指标会自动收集。
Android
在主活动中,为Android SDK设置应用程序上下文。
protected override void OnCreate (Bundle bundle) { ... Config.SetContext (Application.Context); ... }
In every activity, implement lifecycle calls.
protected override void OnResume() { ... Config.CollectLifecycleData (this); ... } protected override void OnPause() { ... Config.PauseCollectingLifecycleData (); ... }