package com.rehome.sgbaxj;

import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.os.Bundle;
import com.tencent.bugly.crashreport.CrashReport;
import com.xuexiang.xui.XUI;
import com.yolanda.nohttp.NoHttp;
import com.zhy.autolayout.config.AutoLayoutConifg;
import org.litepal.LitePalApplication;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.multidex.MultiDex;

public class MyApplication extends LitePalApplication implements Application.ActivityLifecycleCallbacks{
    public static Context context = null;

    @Override
    public void onCreate() {
        super.onCreate();
        XUI.init(this);
        NoHttp.initialize(this);
        AutoLayoutConifg.getInstance().useDeviceSize();
        CrashReport.initCrashReport(getApplicationContext(), "efefa9e04c", true);
        registerActivityLifecycleCallbacks(this);
    }

    @Override
    protected void attachBaseContext(Context base) {
        super.attachBaseContext(base);
        MultiDex.install(base);
    }

    @Override
    public void onActivityCreated(@NonNull Activity activity, @Nullable Bundle bundle) {

    }

    @Override
    public void onActivityStarted(@NonNull Activity activity) {

    }

    @Override
    public void onActivityResumed(@NonNull Activity activity) {

    }

    @Override
    public void onActivityPaused(@NonNull Activity activity) {

    }

    @Override
    public void onActivityStopped(@NonNull Activity activity) {

    }

    @Override
    public void onActivitySaveInstanceState(@NonNull Activity activity, @NonNull Bundle bundle) {

    }

    @Override
    public void onActivityDestroyed(@NonNull Activity activity) {

    }
}
