Код: Выделить всё
import { LocalNotifications, ELocalNotificationTriggerUnit } from '@ionic-native/local-notifications/ngx';
@Injectable()
export class NotificationService {
constructor(private localNotifications: LocalNotifications) {}
// Call this method to send a repeating notification
sendIntervalNotification() {
this.localNotifications.schedule({
id: 1,
title: 'Reminder',
text: 'This is your scheduled notification',
trigger: {
every: { minute: 1 }, // runs every 1 minute
count: 10 // total number of times to repeat
},
foreground: true, // show when app is foregrounded
lockscreen: true // try to display on lockscreen
});
}
}
Подробнее здесь: https://stackoverflow.com/questions/797 ... os-android
Мобильная версия