Giter Site home page Giter Site logo

Comments (11)

royjr avatar royjr commented on April 28, 2024 4

bump

from capacitor-plugins.

Juarrow avatar Juarrow commented on April 28, 2024 3

Any updates on the implementation?

from capacitor-plugins.

Sitronik avatar Sitronik commented on April 28, 2024 1

Hello guys, please tell me when you plan to add functionality notifyListener('localNotificationReceived') for LocalNotification plugin ?
This is actually in the plans?
Just a year has passed ..

from capacitor-plugins.

jcesarmobile avatar jcesarmobile commented on April 28, 2024

In the title you say localNotificationReceived, but in the code sample you provided you use localNotificationsReceived, can you double check?

from capacitor-plugins.

MayKikuchiThrive avatar MayKikuchiThrive commented on April 28, 2024

@jcesarmobile whoops, sorry about that! This was a typo in the bug report . The problem is seen when I use

LocalNotifications.addListener('localNotificationReceived', (notification) => {
console.log('notification received!!');
});

in the code. Also, this exact code does work in ios, just not android. I have fixed the bug report accordingly. Thank you!

from capacitor-plugins.

jcesarmobile avatar jcesarmobile commented on April 28, 2024

just checked and it's not implemented

from capacitor-plugins.

vovikdrg avatar vovikdrg commented on April 28, 2024

@jcesarmobile Will it be implemented?

Looks like android has event which can solve this problem, but as I understand it works only one timer and not recurring

https://developer.android.com/reference/android/app/AlarmManager#setExact(int,%20long,%20java.lang.String,%20android.app.AlarmManager.OnAlarmListener,%20android.os.Handler)

Looks like even simpler
https://github.com/ionic-team/capacitor/blob/master/android/capacitor/src/main/java/com/getcapacitor/plugin/notification/TimedNotificationPublisher.java
How to send notifyListeners?

Also as part of this shouldn't it show notification only if app is in background?

from capacitor-plugins.

vovikdrg avatar vovikdrg commented on April 28, 2024

@jcesarmobile Hey mate could you please help with this? I want to contribute to this one

from capacitor-plugins.

jcesarmobile avatar jcesarmobile commented on April 28, 2024

only plugin classes have notifyListener method, so you have to get the plugin and call a plugin method where you have the notifyListener, take a look on PushNotifications plugin

from capacitor-plugins.

Sopamo avatar Sopamo commented on April 28, 2024

As a workaround on capacitor 2.x you can listen to the localNotificationActionPerformed event as that one is implemented and fires when the user taps on the notification.

from capacitor-plugins.

ionitron-bot avatar ionitron-bot commented on April 28, 2024

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of the plugin, please create a new issue and ensure the template is fully filled out.

from capacitor-plugins.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.