Skip to content

[flutter_local_notifications] add support for notifications on android auto - #2748

Open
derrik-fleming wants to merge 3 commits into
MaikuB:masterfrom
Gentex-Corporation:feat/android-auto-notifications
Open

[flutter_local_notifications] add support for notifications on android auto#2748
derrik-fleming wants to merge 3 commits into
MaikuB:masterfrom
Gentex-Corporation:feat/android-auto-notifications

Conversation

@derrik-fleming

Copy link
Copy Markdown
Contributor

Closes #2747

@derrik-fleming derrik-fleming changed the title feat: add support for notifications on android auto [flutter_local_notifications] add support for notifications on android auto Jan 22, 2026
* plugin
* for proper Android Auto support.
*
* Implementing this interface allows your MainActivity to provide the

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the API docs, is this implying developers will need to update native code before they can make use of the changes in this PR?

If so, what sticks out to me is the following

  • readme should be updated to add instructions on what changes are required on the native side
  • if possible, update example app with the changes so that there is one button for the scenario where it shows a notification on Android Auto. I haven't worked with Android Auto before but once PR is ready, I assume the emulator can be used to see how the example runs there

@derrik-fleming derrik-fleming Jan 29, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the API docs, is this implying developers will need to update native code before they can make use of the changes in this PR?

Yes, but the requirement here is fairly minimal in that, if a developer wants notifications on Android Auto via flutter_local_notifications they must provide a reference to their implementation of CarAppService by implementing the CarAppServiceClassConsumer interface on the Activity.

To be clear, I'm open to opinions here, but what I was attempting to do is create a bridge at the application level that flutter_local_notifications could leverage to retrieve the necessaries from a plugin providing Android Auto features (or wherever the CarAppService implementation is defined).

readme should be updated to add instructions on what changes are required on the native side

I definitely can do that.

if possible, update example app with the changes so that there is one button for the scenario where it shows a notification on Android Auto. I haven't worked with Android Auto before but once PR is ready, I assume the emulator can be used to see how the example runs there

I'm not sure this can be easily accomplished but I can look into it. If anything, I could add some commented out snippets in there that might be helpful.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm feeling like the docs I added to the README.md might be enough to cover your related concerns with respect to the example app, but let me know if not.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It partially does. I should have clarified the main reason on having updates in the example app is so that the app contains as much code that is ready to run to demonstrate all available features. It also helps that when a bug is reported, developers can use the app to see if they can reproduce the scenario. If the example app is missing the scenario, developers can fork it and add the scenario they run into.

With all that said, if possible and assuming the entire app can run on an Android auto device, can you see if it can be updated? Happy to help out where needed and if it's not possible for whatever reason then do let me know

Comment thread flutter_local_notifications/android/build.gradle Outdated
@MaikuB

MaikuB commented Jan 29, 2026

Copy link
Copy Markdown
Owner

I will take a look at this more properly once the iOS one is merged in but have left comments from what I've seen so far. In case you haven't seen it yet, it says your branch has conflicts right now

@derrik-fleming
derrik-fleming force-pushed the feat/android-auto-notifications branch from f642993 to 3e4dcc5 Compare January 29, 2026 19:28

@MaikuB MaikuB left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@derrik-fleming I tried to see if I could merge this with the view that example app could be updated later. However, I noticed pipeline checks failed. I've addressed the linter issue that if you updated your fork and branch that it'll pick it up. Are you able to look into the failing tests though?

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.

[android] Add Android Auto notification support

2 participants