package com.yzx.ebrand.receiver

import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import com.yzx.ebrand.MainActivity




class BootReceiver :BroadcastReceiver(){
    override fun onReceive(context: Context?, intent: Intent?) {
        intent?.apply {
            if (action.equals("android.intent.action.BOOT_COMPLETED")) {
                val i = Intent(context, MainActivity::class.java)
                i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
                context?.startActivity(i)
            }
        }
    }
}