aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/services/UpdateReceiver.kt
blob: 9e53889e19576c4ab817ee8146eb00ae10b99e99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package com.pitchedapps.frost.services

import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import com.pitchedapps.frost.utils.L
import com.pitchedapps.frost.utils.Prefs

/**
 * Created by Allan Wang on 2017-05-31.
 *
 * Receiver that is triggered whenever the app updates so it can bind the notifications again
 */
class UpdateReceiver : BroadcastReceiver() {

    //todo check action warning
    override fun onReceive(context: Context, intent: Intent) {
        L.d("Frost has updated")
        context.scheduleNotifications(Prefs.notificationFreq) //Update notifications
    }

}