Cordova-plugin-local-notifications: I installed local notification but make error for not installing

Created on 26 Apr 2018  路  24Comments  路  Source: katzer/cordova-plugin-local-notifications

Hello guys
I have installed this plugin, remove platform ios, then add it again, on build after running on iphone 8 plus on simulator, it is not working,

2018-04-26 13:15:18.289191+0430 THISAPP[12338:503940] WARN: Native: tried calling LocalNotifications.getAllScheduled, but the LocalNotifications plugin is not installed. 2018-04-26 13:15:18.289460+0430 THISAPP[12338:503940] WARN: Install the LocalNotifications plugin: 'ionic cordova plugin add cordova-plugin-local-notification' 2018-04-26 13:15:18.289649+0430 THISAPP[12338:503940] database already open: data-sarresid.db 2018-04-26 13:15:18.289827+0430 THISAPP[12338:503940] plugin_not_installed

I have done this 1000 times: ionic cordova plugin add cordova-plugin-local-notification

what is happening???

Most helpful comment

@devsmn

It's not clear at all, you say you have an app that doesn't work, you say you have another app that does work, you have given zero information about what works. you have given zero information about what doesn't work, you have given no code, no error message, no environmental information. You have NOW said it "maybe the same error as this post", but you have still not provided any information whatsoever.

All you have said is something works, something doesn't work and asked for help.

Create a new issue, fill the template out properly with all the information requested, code, what you expect to happen, what happens. Don't hijack this thread.

All 24 comments

Try using the installation method on here rather than

ionic cordova plugin add cordova-plugin-local-notification

Also the template is there for a reason, please use it.

I used this code to install it on my ionic code:
cordova plugin add cordova-plugin-local-notification
I didn't understand why is it telling me it is not installed!!!!
tnx for your help!

Don't install using ionic use the installation method on the home page here,

is there any way so I can call function on scheduled notification triggered?

Is this working now?

yes
thank you so much, it is working perfect,
I did this for every one else want to know:

`
declare var cordova;

@Component({
templateUrl: 'app.html'
})
export class MyApp {
@ViewChild(Nav) nav: Nav;
cordova.plugins.notification.local.schedule({
id:'1',
title: 'title',
trigger: { at: at },
data: {
kind: 'kind'
},
sound: null
});
`

How did you install it? Can you give me a full list of commands?
Just cordova plugin add cordova-plugin-local-notification ?
Do you use ionic-native?

Thank you.

I have a blank app with ionic's local notification wrapping.. It works fine, when I came in my work's app it brokes. How is it possible?

@devsmn So something (you don't say what), doesn't work (you don't say what) doing something (you don't say what).

Is that a fair summary?

@rwillett it isn't.

I have a blank app where local notification's plugin (_in the ionic native wrapper_) works without problems.

Meanwhile in my work's project the same local notification's plugin doesn't work (with the same error of this post, maybe?!?)

It looks clear to me..

@devsmn

It's not clear at all, you say you have an app that doesn't work, you say you have another app that does work, you have given zero information about what works. you have given zero information about what doesn't work, you have given no code, no error message, no environmental information. You have NOW said it "maybe the same error as this post", but you have still not provided any information whatsoever.

All you have said is something works, something doesn't work and asked for help.

Create a new issue, fill the template out properly with all the information requested, code, what you expect to happen, what happens. Don't hijack this thread.

@rwillett damn to me! I just laughs for what you said!! don't be angry man! Lol!!! :-) 馃憤

@devsmn I almost understand what you said! this is because of plugins conflicts!
you should search for exact errors in your project first.
and don't use what is said in ionic website.
use 'cordova' instead of using 'this'.

declare var cordova;

put this code at top of @component in app.component.ts

after building it, if there was any error please share your code or errors!

@rwillett hi man,
something is wrong!
I am using this code:
cordova.plugins.notification.local.on('trigger', function (msg) { console.log('triggered'); });

but this is working only when app is on screen!
I close the app, and notification will come, but, the event is not triggered!

We never got triggers to work either.

tnx :/
but it is working on screen on.
ok
I want to play special sound on notification which is 4 minutes,
my code is:
cordova.plugins.notification.local.schedule({ id: i1, title: 'title', trigger: { at: at },= sound: 'file://assets/mp.caf', });

but , it doesn't even vibrate, and no sound is playing!!
what wrong is it?

NO BODY ANSWERING AFTER 9 DAYS?

Same issue, I have the "Not installed" error when I use getAllScheduled so I use getScheduledIds instead. The error is maybe related to Ionic Native.

use the plugin inside this
this.platform.ready().then(() => {
// local notification code here
});

may work

Same issue, I have the "Not installed" error when I use getAllScheduled so I use getScheduledIds instead. The error is maybe related to Ionic Native.

Might be so: .getAll() works just fine, .getAllScheduled() is giving trouble

Confirming this is a bug in the Ionic wrapper: getAll() works fine, getAllScheduled or getAllTriggered does not. It gives the console error Ionic Native: tried calling LocalNotifications.getAllScheduled, but the LocalNotifications plugin is not installed.

notifications.on('click') works fine, but calling notifications.fireQueuedEvents()
throws
tried calling LocalNotifications.fireQueuedEvents

This error was on beta-2, but gone in beta-3

Hello, having the same issue, it says i didnt installed it and keep throwing me the error

[Warning] Native: tried calling LocalNotifications.hasPermission, but the LocalNotifications plugin is not installed. (vendor.js, line 198981)
[Warning] Install the LocalNotifications plugin: 'ionic cordova plugin add cordova-plugin-local-notification' (vendor.js, line 198987)

How to solve it please?

Was this page helpful?
0 / 5 - 0 ratings