Giter Site home page Giter Site logo

Comments (12)

kaelumania avatar kaelumania commented on July 24, 2024 2

How do I implement a JS callback to detect if a user selected a notification action (similar to iOS)?

from react-native-notifications.

dininski avatar dininski commented on July 24, 2024 1

Hi @mistyleaf, you can check out #4 along with the android branch as it seems that thanks to @amitdwix it is making great progress.

from react-native-notifications.

dininski avatar dininski commented on July 24, 2024 1

@varungupta85 this is something I am also actively looking forward to. From what I have seen in RN there is currently no simple way to have a notification for music control, for example, in an android app, other than writing a lot of Java code to implement the notification as well as the bridge yourself. This seems pretty crippled in terms of functionality for the android version of RN. I have no doubt that the guys will have something that can solve this! Once again thanks @d4vidi for your awesome work so far!

from react-native-notifications.

lidanh avatar lidanh commented on July 24, 2024

Hi @mistyleaf and thanks for the warm words! We're working on more advanced features for android, and you're more than welcome to help us and submit PRs.

from react-native-notifications.

d4vidi avatar d4vidi commented on July 24, 2024

Hi all, thanks for the positive feedback! :-)
Our Android code is in fact already highly extensible! While lacking description in our README, it does enable users to apply any feature specified by the Android notification's native API (e.g. buttons, extended layout, Android-7 reply box) over the incoming notifications. I'll update the README soon to explain how this can be easily done.

from react-native-notifications.

dininski avatar dininski commented on July 24, 2024

Great! One more thing - when could we expect local notifications as this is crucial for my use case. Unfortunately I am not very well versed in Android, otherwise I would be already submitting a PR.

from react-native-notifications.

d4vidi avatar d4vidi commented on July 24, 2024

I'm pretty certain we'll get it done sometime next week.

from react-native-notifications.

d4vidi avatar d4vidi commented on July 24, 2024

@dininski Please check out this new wiki which explains how to customize the notifications. There's no JS API to support customizations (e.g. interactive notifications) but natively, everything is supported.

from react-native-notifications.

varungupta85 avatar varungupta85 commented on July 24, 2024

hi @d4vidi, I have been closely following this project as I plan to use it once you guys have support for local notifications for Android. One of the features I currently use in my app is notification actions. I have gone through the wiki and understand how could one achieve customizations within the Android notifications and really like the API as it allows a user to support all kind of notifications related workflows that Android supports. My question is that would I be able to send events to the JS side when a user clicks on any actions? I am not sure if I will be able to do that right now. I guess that may be one of the ways the user would want to handle the action from the user by sending an event to the JS side and the JS side can take appropriate actions for the user action.

from react-native-notifications.

d4vidi avatar d4vidi commented on July 24, 2024

So currently local notification are supported on Android (in 1.1.4). But unlike on iOS, the API doesn't attempt at allowing for customizations inherently. Instead, it is simply an endpoint that forwards your data object (e.g. a title and message) onto the same process as of receiving a remote push notification.
Adding customization is therefore up to the developers - i.e. the way they override the PushNotification (as explained by the wiki) will determine which notification(s) will be posted.

While this approach is super flexible, I'm currently inspecting ways for providing convenience flows for posting action buttons (and perhaps even the Android 7+ reply).

from react-native-notifications.

stale avatar stale commented on July 24, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest Detox and report back. Thank you for your contributions.

from react-native-notifications.

stale avatar stale commented on July 24, 2024

The issue has been closed for inactivity.

from react-native-notifications.

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.