Comments (12)
How do I implement a JS callback to detect if a user selected a notification action (similar to iOS)?
from react-native-notifications.
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.
@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.
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.
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.
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.
I'm pretty certain we'll get it done sometime next week.
from react-native-notifications.
@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.
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.
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.
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.
The issue has been closed for inactivity.
from react-native-notifications.
Related Issues (20)
- "$" getting copied HOT 1
- Code that setting NotificationChannel sound on Android might lead unexpected consequences HOT 1
- Application does not trigger registerNotificationOpened when it is closed, only when it is in the background.
- I can't get notifications to open my app HOT 1
- How to undo `Notifications.registerRemoteNotifications()` ? HOT 3
- Minification failure with R8: Compilation failed for ReactAppLifecycleFacade$1 in react-native-notifications
- Not receiving any notification on iOS release mode only HOT 1
- Huawei push notification in library
- dexOptions is obsolete
- Feature request: add support for iOS simulator push notifications HOT 3
- Does FCM work with this package in iOS? HOT 4
- Handle callback when notification in background / terminate app HOT 3
- When I click on the notification on my android app, entire app reloads HOT 4
- Question - is there support for the new RN architecture? HOT 1
- Suggestion - documentation update HOT 1
- Feature request: support for dynamic Live Activities on IOS
- What about the wiki for integration with react notification?
- registerRemoteNotificationsRegistrationDenied being called even when "Allowed" clicked
- is it possible to send local notification when App is closed
- [Question]: Grouping on iOS
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-notifications.