package com.zoblak.farmalarm;

import android.annotation.TargetApi;
import android.content.Context;
import android.media.AudioAttributes;
import android.media.AudioManager;
import android.media.Ringtone;
import android.media.RingtoneManager;
import android.net.Uri;
import android.os.Build;
import android.util.Log;

/**
 * Created by senadu on 11/15/16.
 */

public class AlarmResponseHandler {

    AlarmPingResponse response;
    Context context;


    public AlarmResponseHandler(Context context, AlarmPingResponse response) {
        this.response = response;
        this.context = context;
    }

    public void handle() {

        if (response.getAlarmTriggered()) {
            AlarmNotification.notify(context, response.toNotificationMessage(), 1);
            SoundPlayingService.startPlayingAlarm(context);
        }

    }



}
