Skip to content

Commit

Permalink
feat: add android auto media session control support
Browse files Browse the repository at this point in the history
  • Loading branch information
KRTirtho committed Aug 13, 2023
1 parent aa4ac86 commit 0f5748a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 5 additions & 2 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO"/>
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />

<queries>
<!-- If your app opens https URLs -->
Expand All @@ -25,7 +25,7 @@
android:requestLegacyExternalStorage="true"
>
<activity
android:name="com.ryanheise.audioservice.AudioServiceActivity"
android:name="com.ryanheise.audioservice.AudioServiceActivity"
android:exported="true"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
Expand Down Expand Up @@ -66,6 +66,9 @@
</receiver>
<!-- =================== -->

<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 android:name="flutterEmbedding" android:value="2" />
Expand Down
3 changes: 3 additions & 0 deletions android/app/src/main/res/xml/automotive_app_desc.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<automotiveApp>
<uses name="media" />
</automotiveApp>

0 comments on commit 0f5748a

Please sign in to comment.