urbanairship / android-library

Urban Airship Android SDK
Other
111 stars 122 forks source link

Notification action dismisses the notification #162

Closed vikramatscore closed 4 years ago

vikramatscore commented 4 years ago

Preliminary Info

What Airship dependencies are you using?

com.urbanairship.android:urbanairship-fcm:13.2.1

What are the versions of any relevant development tools you are using?

Testing on a real device: Samsung S10+ running Android 10

Report

What unexpected behavior are you seeing?

Clicking on a notification action cancels the notification. The action is being added using ActionsNotificationExtender. I believe the cancellation happens here: NotificationIntentProcessor.

What is the expected behavior?

If the notification cancellation on action button click is as per Android guidelines, please point me to the relevant docs. If not, this behaviour should be configurable.

What are the steps to reproduce the unexpected behavior?

Add a notification with an action. Clicking on action will cancel the corresponding notification.

Do you have logging for the issue?

I can provide logs if needed.

marc-scig commented 4 years ago

Hi @vikramatscore,

Thanks for the feedback. This is indeed the intended design. One of the reasons for this is that notification responses are often used to launch particular functionality in the app and are often of a one-time nature. This behavior also matches our iOS SDK, and we generally try to be consistent across platforms unless the guidelines or platform-specific idioms say otherwise. I'll bring this up with the team, though, and we can discus whether to add configurability as a future enhancement.