question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Notifications not working, but forked Version working

See original GitHub issue

I am trying to create an app which uses local notifications with Phonegap Build. I’ve tried numerous ways to get your plugin to work, but it sadly never worked. Now, I’ve found this https://www.npmjs.com/package/cordova-plugin-local-notifications-npm on npm, which has been forked from you and it works perfectly fine. I am a little worried though, because my app now asks for the permission to write on the sd-card, which it has never done before and in general I’d be happier if i could use your original repo here.

My Environment

  • Plugin version: I tried everything from 0.6 to 0.9
  • Platform: Android
  • OS version: 8.0.0
  • Device manufacturer / model: Xperia G3121
  • Cordova version (cordova -v): IDK (I am using Phonegap Build cli-6.5.0)
  • Cordova platform version (cordova platform ls): IDK

Expected Behavior

I tried a very simple cordova.plugins.notification.local.schedule({ title: 'Hello World', trigger: { in: 5, unit: 'second' } });

Actual Behavior

It doesnt trigger at all if I use your Plugin. Above version 0.6.0, Phonegap Build Cloud Service won’t even let me install the Plugin, even if i set SDK Version to 27.

Steps to Reproduce

This Version does NOT work: config.xml : <widget id="***" version="***"> <name>***</name> <description>***</description> <author>***</author>

`<plugin name="cordova-plugin-local-notification" spec="https://github.com/katzer/cordova-plugin-local-notifications#0.6.0"/>`

</widget>

This one DOES work: config.xml : <widget id="***" version="***"> <name>***</name> <description>***</description> <author>***</author>

`<plugin name="cordova-plugin-local-notifications-npm"/>`

</widget>

index.html: <html> <body> <script src="cordova.js"></script> <script> setTimeout(function(){ cordova.plugins.notification.local.schedule({ title: 'Hello World', trigger: { in: 5, unit: 'second' } }); },5000) ; </script> </body> </html>

Context

As mentioned above, i was just trying to get the plugin running.

Debug logs

I am currently not able to debug on my Phone, as i have no USB-Cable available for remote debugging, if you have any other method of debugging I’d be very pleased to hear of it.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
Steffaancommented, Dec 12, 2018

@dragonStandard123 Get the code from this fork to use local notifications on Android Oreo

0reactions
GitToTheHubcommented, Dec 22, 2018

@Steffaan I’m little bit worried about, that you talk about “Push Notifications”. “Push Notifications” are Network based Notifications and for Google it’s called “Firebase Cloud Messaging” and has nothing to do with Local Notifications. Your change for the permission fix: https://github.com/Steffaan/cordova-plugin-local-notifications/commit/b7c7e75548d6f379cdb79c435e99bbd6547aa9c6 didn’t change anything, because getNotMgr().hasPermission() already has called getNotCompMgr().areNotificationsEnabled() see https://github.com/Steffaan/cordova-plugin-local-notifications/blob/b7c7e75548d6f379cdb79c435e99bbd6547aa9c6/src/android/notification/Manager.java#L92

Read more comments on GitHub >

github_iconTop Results From Across the Web

events - Notify me when there is an update on the upstream of ...
We would want an event to be triggered when a change is made on the parent repository [something we do not control]. The...
Read more >
Fork a repository | Bitbucket Cloud - Atlassian Support
Forking in Bitbucket Cloud is a way for you to clone a repository at a specific point and modify it from there.
Read more >
Configuring Build Notifications - Travis CI Docs
Travis CI can notify you about your build results through email, IRC, chat or custom webhooks. Default notification settings #.
Read more >
The CI experience when working with forks could be improved
When a fork opens a merge request against the source repository, issue the build against the source repository's runners. This ensures the fork ......
Read more >
I get email notifications whenever some fork with an ... - Reddit
I get email notifications whenever some fork with an environment builds. So I basically made a program, the source is on GitHub and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found