import { Injectable } from '@angular/core'; import { Http } from '@angular/http'; import 'rxjs/add/operator/map'; import { NavController } from 'ionic-angular'; import { LocalNotifications } from '@ionic-native/local-notifications'; @Injectable() export class LocalNotificationProvider { constructor(public http: Http, public navController: NavController, private localNotifications: LocalNotifications) {} // TODO ADD STORE CLASS public schedule(userName: string, store: any) { this.localNotifications.schedule({ id: 1, title: 'Welcome to ' + store.name + ' ' + userName + '!' , text: 'What are you looking for today?', at: new Date(new Date().getTime() + 5 * 1000), sound: null, led: 'FF0000', data: { mode: 'visit_shop', target: store } }); } }