package com.ydl.component.base;


import android.app.Application;
import android.content.Context;
import android.content.Intent;

import com.ydl.media.audio.PlayService;
import com.ydl.ydlcommon.base.delegate.IAppLifecycles;
import com.ydl.ydlcommon.utils.YdlBuryPointUtil;

import org.jetbrains.annotations.NotNull;

/**
 * Created by haorui on 2019-09-02.
 * Des:
 */
public class DemoAppLifecycles implements IAppLifecycles {
    @Override
    public void attachBaseContext(@NotNull Context base) {

    }

    @Override
    public void onCreate(@NotNull Application application) {
        //数据埋点初始化--一定要放在主进程中
        YdlBuryPointUtil.init(application);
        Intent intent = new Intent(application, PlayService.class);
        application.startService(intent);
    }

    @Override
    public void onTerminate(@NotNull Application application) {

    }
}
