Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

[Android] notification with inline reply - #612

Merged
Dallas62 merged 19 commits into
zo0r:devfrom
lluis-sancho:master
Dec 12, 2020
Merged

Dallas62 merged 19 commits into
zo0r:devfrom
lluis-sancho:master

Conversation

@lluis-sancho

@lluis-sancho lluis-sancho commented Dec 15, 2017 •

Copy link
Copy Markdown
Contributor

Summary

Added an action "ReplyInput" that will show in the notification a button with an inline reply (an input to write in).

Changes Introduced

When configuring the actions from React Native it is required to register an action named "ReplyInput", then schedule the notification with the action parameter as "ReplyInput" and two more parameters:

  • reply_placeholder_text (Text shown in the placeholder of the input)
  • reply_button_text (Action button text)

When the user writes in the input and press the send button, a parameter is added in the bundle to pass it to React Native. To get the text, you will receive it in "action.dataJSON" as "reply_text".

Documentation:

https://developer.android.com/guide/topics/ui/notifiers/notifications.html#inline-reply-action
Updated Readme with a code explanation

@lluis-sancho lluis-sancho changed the title Android notification with inline reply [Android] notification with inline reply Dec 15, 2017
@camumino

Copy link
Copy Markdown

Great @lluis-sancho I was looking for something like this. Thanks!

@jose-izquierdo

Copy link
Copy Markdown

This is an outstanding job. Thanks for sharing @lluis-sancho

@ziadalame

Copy link
Copy Markdown

Any updates on when this pull request will be merged?

@KalebMatthews

Copy link
Copy Markdown

Can we get a timeline on if/when this will be merged in? I would LOVE this functionality!!

@mkamals

mkamals commented Jul 11, 2019 •

Copy link
Copy Markdown

@zo0r : Waiting for this PR to be merged. It's long pending, almost a year now. Would be nice to have this in-line reply feature of push notifications implemented for android.

@lluis-sancho : There seems to be conflict with the branch. It would be good to have it resolved and raise the PR again so that it can be merged.

Thanks.

@vikasg603

Copy link
Copy Markdown

Any update on this when this pull request is going to merge?
It's quite important when building a chat application.

@MadCoderme

Copy link
Copy Markdown

please resolve and merge this pr, it has been very important to add this feature since it is nearly 3 years

@lluis-sancho

Copy link
Copy Markdown
Contributor Author

Updated from master and resolved conflicts.

@vikasg603

vikasg603 commented Nov 9, 2020 •

Copy link
Copy Markdown

@lluis-sancho I have seen that you have mentioned the library https://github.com/holmesal/react-native-ios-notification-actions

But the admin has archived it and not maintaining it.

Do you have any other suggestions?

@Dallas62

Dallas62 commented Nov 9, 2020

Copy link
Copy Markdown
Collaborator

Hi @vikasg603
Take a look to the RNC/push-notification-ios library, actions are now included. (from 1.7.0)

@Dallas62 Dallas62 self-assigned this Nov 9, 2020
@vikasg603

Copy link
Copy Markdown

Yeah, just checked.

@MadCoderme

Copy link
Copy Markdown

When will it be merged? This is really a cool feature! Would love to know the time 😃

@Dallas62
Dallas62 changed the base branch from master to dev December 1, 2020 21:22
@Dallas62

Dallas62 commented Dec 1, 2020 •

Copy link
Copy Markdown
Collaborator

Hi @lluis-sancho
Unfortunately, I'm not able to run the example project with your PR 😕
Build failed.

react-native-push-notification/example/node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotification.java:316: error: method abandonPermissions() is already defined in class RNPushNotification
    public void abandonPermissions() {
                ^
/react-native-push-notification/example/node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotification.java:334: error: method getChannels(Callback) is already defined in class RNPushNotification
    public void getChannels(Callback callback) {
                ^
/react-native-push-notification/example/node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotification.java:346: error: method channelExists(String,Callback) is already defined in class RNPushNotification
    public void channelExists(String channel_id, Callback callback) {
                ^
/react-native-push-notification/example/node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotification.java:358: error: method createChannel(ReadableMap,Callback) is already defined in class RNPushNotification
    public void createChannel(ReadableMap channelInfo, Callback callback) {
                ^
/react-native-push-notification/example/node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotificationActions.java:39: error: cannot find symbol
          bundle.putCharSequence("reply_text", remoteInput.getCharSequence(KEY_TEXT_REPLY));
                                                                           ^
  symbol:   variable KEY_TEXT_REPLY
  location: class RNPushNotificationActions
5 errors

@Dallas62
Dallas62 merged commit b343f50 into zo0r:dev Dec 12, 2020
elburu pushed a commit to elburu/react-native-push-notification that referenced this pull request Mar 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants