Custom notification buttons actions when the app is closed (Android)

I'm working on integrating with Android direct reply introduced in Android 7 (see here: and I've got the custom button with the RemoteInput and everything working. Everything is working great, until the user decides to close the app (swipe up from task manager). I've been looking through the UA docs trying to figure out how to have a custom action button with custom logic activate when the app is closed - like launching a background service or something of the sort, but I haven't been able to find anything.

I'm using onNotificationBackgroundAction in my custom NotificationListener which works great as long as the app is still running in the background. But with direct reply it always looks like it works to the user regardless of if the app is actually running in the background or not which means the user thinks they've successfully sent a direct reply, but nothing happened.

Are custom action buttons with custom logic supported if the app is not running? Or is this case not possible?

Didn't find what you were looking for?

New post



Please sign in to leave a comment.