Skip to content

0x03f Pageload_en

hui.zhao edited this page Dec 8, 2019 · 3 revisions

Pageload

Install

Use the following configuration to install

GodEye.instance().install(GodEyeConfig.defaultConfigBuilder().withPageloadConfig(new GodEyeConfig.PageloadConfig(new DefaultPageInfoProvider())).build());

or

<pageload pageInfoProvider="cn.hikyson.godeye.core.internal.modules.pageload.DefaultPageInfoProvider"/>

The pageInfoProvider is used to provide page information. Class DefaultPageInfoProvider will be used by default. You can customize the pageInfoProvider by implementing the PageInfoProvider interface, informations provided here will be used in callback information of pagelifecycleeventinfo.pageinfo.extrainfo.

Production and consumption of data

Use the following methods to observe the output:

try {
            GodEye.instance().observeModule(GodEye.ModuleName.PAGELOAD, new Consumer<PageLifecycleEventInfo>() {
                @Override
                public void accept(PageLifecycleEventInfo pageLifecycleEventInfo) throws Exception {
                }
            });
        } catch (UninstallException e) {
            e.printStackTrace();
        }

The callback will be called in any lifecycle of activity or fragment include fully loaded and draw end.

Because AndroidGodEye can't automatically recognize that the page is fully loaded, so you must call GodEyeHelper.onPageLoaded(Activity.this); to tell AndroidGodEye that the page is loaded, other lifecycle events and page draw event are automatically recognized and produced by AndroidGodEye.

DebugMonitor Dashboard

android_god_eye_pageload

Clone this wiki locally