Skip to content

Conversation

@uncledoc
Copy link

Changes

  • Added an optional initialization parameter for specifying the target Activity name.
  • If the parameter is not provided, the default behavior remains unchanged.

Why

In some applications, the default launcher Activity is not suitable as a notification entry point.
This enhancement gives developers more flexibility and control over app navigation from notifications.

Notes

  • Backward compatible: existing code without the new parameter continues to work as before.

@MaikuB
Copy link
Owner

MaikuB commented Oct 6, 2025

Thanks for the PR and sorry for the delay in getting back. I'll need to test this out but do you have some examples where an app shouldn't use the default activity? I have some further thoughts on this but wanted to know before I share

@uncledoc
Copy link
Author

uncledoc commented Oct 7, 2025

I need this functionality primarily to help migrate a large existing application to Flutter.

However, the improvement isn't limited to migration. It also allows for greater isolation of specific flows. For instance, launching certain activities with FLAG_ACTIVITY_NEW_TASK (e.g., for in-app purchases or specific login flows) or catering to specific security use cases where task separation is required.

@MaikuB
Copy link
Owner

MaikuB commented Oct 17, 2025

Thanks for more details on this. Based on what you said, as initialisation is supposed to be a one-time thing, perhaps it would be more beneficial if the activity could be set per individual notification?

@uncledoc
Copy link
Author

That's a great suggestion and certainly an improvement over my current approach. I'll need to think about the best way to implement that change.

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.

2 participants