package com.cooleshow.base.common

import android.app.Application
import android.content.Context
import com.alibaba.android.arouter.launcher.ARouter


/*
    Application 基类
 */
abstract class BaseApplication : Application() {


    override fun onCreate() {
        super.onCreate()
        context = this
        isTeacherClient = isTeacherClient()
        //ARouter初始化
        ARouter.openLog()    // 打印日志
        ARouter.openDebug()
        ARouter.printStackTrace()
        ARouter.init(this)

    }


    /*
        全局伴生对象
     */
    companion object {
        var isTeacherClient = false
        lateinit var context: Context
    }

    abstract fun isTeacherClient(): Boolean
}
