Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Action cancellation sample #11

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jonahwh
Copy link
Contributor

@jonahwh jonahwh commented Sep 13, 2021

This PR is dependant on #8, #9 and #10 . See b7c970c for the isolated changes

Adds a sample "CancellableAction" to the demo app.

cancellable.mp4

Introduces two new optional parameters to NotificationProperties' default constructor:
* notificationChannelId: This allows developers to customize the Notification Channel ID, so they can put the notification in the exact channel they desire
* notificationBuilderExtender: Accepts a lambda that can modify the Notification.Builder so developers can fully customize the Foreground Service notification
```
Intent(context, IntentServiceAction::class.java).apply {
  action = IntentServiceAction.ACTION_STOP
}
```

Any running actions will be stopped with an InterruptedException
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant