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


1 comment

  • Hi David,

    This is Arushi from Airship Technical Support. Within Android, notification delivery is handled in a manner different from that within iOS. All notifications go through the app first before being displayed, the app doesn't have to be active or even running. Pushes will still work if someone reboots their phone or the app is, backgrounded. For apps that are killed/closed, there are valid reasons to not receive notifications though. When a user kills an app and doesn't restart it, there's an assumption that can safely be made that they don't want to be contacted further or, alternatively, they don't want the app to be using up any resources. Most of the time, however, that's not a real problem, unless the device has a known tendency to kill apps in order to save battery or if the user has a third-party task manager installed.

    Comment actions Permalink

Please sign in to leave a comment.