package rallyedto.epicalyxedto.rodedto.trunkedto.winneredto

import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import rallyedto.battleedto.acresedto.Criticismedto
import rallyedto.epicalyxedto.rodedto.trunkedto.Obscureedto
import rallyedto.talledto.blewedto.Pianoedto
import rallyedto.talledto.blewedto.Robedto


class Addedto : BroadcastReceiver() {
    override fun onReceive(p0: Context?, p1: Intent?) {
        Robedto.event("alarm_push")
        val firstAlemtime = Pianoedto.getInstance().getLong("firstAlemtime", 0L)
        if (firstAlemtime > 0) {
            val leatTime = System.currentTimeMillis()
            if (leatTime - firstAlemtime >= 1000 * 30 * 60) {
                Obscureedto.sendNotification(Criticismedto.context, "alarm")
            }
        }
        Pianoedto.getInstance().put("firstAlemtime", System.currentTimeMillis())
        return
    }
}