I can not use cordova plugins

(My English isn’t very good )

Maybe it’s a very simple matter.I’m beginner
I am developing an Online Radio Stream app.I want to use Notifications.


I am applying this.

I add this,
cordova.plugins.notification.local.schedule({
title: ‘Happy Birthday!!!’,
trigger: { every: { month: 10, day: 27, hour: 9, minute: 0 } } . //What matters to me but non-working section on ionic local notifications
});

And I am constantly getting the same error.

underlined cordova

Cannot find name ‘cordova’

WHY? :frowning:

how to use this plugin?

declare let cordova: any;
in your file at first line globally or in constructor

If you are using angular2 or higher

use it like local-notification.

Please try a simple plugin first to see if all works, before trying this one

But it doesn’t allow ‘trigger’ for Schedule Notifications @heenavora

It is work.For example

This works well.

But I want to use trigger.It doesn’t allow.

I also wanted to use the https://github.com/katzer/cordova-plugin-local-notifications

I guess I’m trying to do something stupid, but i don’t know. I need to use trigger :slight_smile:

@Tommertom

may be this will help you.

@Heenavora,

when i write this,
trigger: { every:‘1’, unit:‘minute’}

Error;
Argument of type ‘({ id: number; title: string; text: string; data: { mydata: string; }; at: Date; } | { id: number…’ is not assignable to parameter of type ‘ILocalNotification | ILocalNotification[]’.
Type ‘({ id: number; title: string; text: string; data: { mydata: string; }; at: Date; } | { id: number…’ is not assignable to type ‘ILocalNotification[]’.
Type ‘{ id: number; title: string; text: string; data: { mydata: string; }; at: Date; } | { id: number;…’ is not assignable to type ‘ILocalNotification’.
Type ‘{ id: number; title: string; text: string; data: { mydata: string; }; at: Date; trigger: { every:…’ is not assignable to type ‘ILocalNotification’.