playback: fix media intent detection [#62]

Some apps query for media apps by checking for apps that have a
BroadcastReciever that handles the ACTION_MEDIA_BUTTON intent. However,
Auxio does not have a custom media button reciever, instead relying on
the androidx media button reciever. This resulted in Auxio not showing
up in apps like GadgetBridge. Fix this by exposing the androidx media
button reciever in the manifest, which allows this app to be detected.
This commit is contained in:
OxygenCobalt 2022-01-23 11:04:27 -07:00
parent c98d131316
commit b04611c3be
No known key found for this signature in database
GPG key ID: 37DBE3621FE9AD47

View file

@ -56,6 +56,18 @@
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher" /> android:roundIcon="@mipmap/ic_launcher" />
<!--
Workaround to get apps that search for media apps by checking for a BroadcastReceiver
to detect Auxio, as we let the media APIs handle this.
-->
<receiver android:name="androidx.media.session.MediaButtonReceiver"
android:label="Auxio"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MEDIA_BUTTON" />
</intent-filter>
</receiver>
<receiver <receiver
android:name=".widgets.WidgetProvider" android:name=".widgets.WidgetProvider"
android:exported="false" android:exported="false"