package com.za.common

import android.app.Application
import com.tencent.bugly.Bugly
import com.tencent.mmkv.MMKV
import com.za.base.AppConfig
import com.za.common.log.LogUtil
import com.za.common.speech.SpeechManager
import com.za.room.RoomHelper
import com.za.service.location.ZdLocationManager

object ZDManager {
	lateinit var application : Application

	fun init(application : Application, isRelease : Boolean = false) {
		this.application = application
		thirdSdkInit(isRelease)
	}

	private fun thirdSdkInit(isRelease : Boolean = false) {
		GlobalData.application = application        // 在 Application 中初始化 MMKV，所有进程共享同一存储路径
		MMKV.initialize(application)
		AppConfig.init(isRelease)
		Bugly.init(application, "6972a6b56d", true)
		LogUtil.init(application)
		RoomHelper.init(application)
		ZdLocationManager.init(application)
		SpeechManager.init(application)
	}
}
