import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams, AlertController, Platform, DateTime } from 'ionic-angular';

import { LocalNotifications } from '@ionic-native/local-notifications';



@IonicPage()
@Component({
  selector: 'page-alarm',
  templateUrl: 'alarm.html',
})
export class AlarmPage {


  constructor(public navCtrl: NavController, private localNoti: LocalNotifications, private platform: Platform){


  }


  btnPushClicked(){
    this.platform.ready().then(() => {
      this.localNoti.schedule({
        title: 'Vita-Alarm!',
        text: 'Take your Vitamin!',
        trigger: {at: new Date(new Date().getTime() + 3600)},
        led: 'FF0000',
        
     });
    });
  }









}
