feat: Forward notifications to Android Auto
This commit is contained in:
parent
2d240ccda3
commit
40bd7eed91
6 changed files with 13 additions and 2 deletions
|
|
@ -14,6 +14,7 @@ if (file("google-services.json").exists()) {
|
|||
|
||||
dependencies {
|
||||
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.4") // For flutter_local_notifications // Workaround for: https://github.com/MaikuB/flutter_local_notifications/issues/2286
|
||||
implementation("androidx.core:core-ktx:1.17.0") // For Android Auto
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -138,6 +138,11 @@
|
|||
<!-- From flutter_local_notifications package for notification actions -->
|
||||
<receiver android:exported="false" android:name="com.dexterous.flutterlocalnotifications.ActionBroadcastReceiver" />
|
||||
|
||||
<!-- To make notifications available in Android Auto -->
|
||||
<meta-data
|
||||
android:name="com.google.android.gms.car.application"
|
||||
android:resource="@xml/automotive_app_desc"/>
|
||||
|
||||
<!-- Don't delete the meta-data below.
|
||||
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
||||
<meta-data
|
||||
|
|
|
|||
3
android/app/src/main/res/xml/automotive_app_desc.xml
Normal file
3
android/app/src/main/res/xml/automotive_app_desc.xml
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<automotiveApp>
|
||||
<uses name="notification" />
|
||||
</automotiveApp>
|
||||
Loading…
Add table
Add a link
Reference in a new issue