3.3 KiB · text History eddae77
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

    <!-- Draw the bubble over other apps (user grants under "Display over other apps"). -->
    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE"/>
    <uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>

    <!-- Package visibility (API 30+) so we can label / icon the source player. -->
    <queries>
        <intent>
            <action android:name="android.intent.action.MAIN"/>
            <category android:name="android.intent.category.LAUNCHER"/>
        </intent>
        <intent>
            <action android:name="android.media.browse.MediaBrowserService"/>
        </intent>
    </queries>

    <application
        android:name=".FloatyApp"
        android:label="@string/app_name"
        android:icon="@mipmap/ic_icon"
        android:roundIcon="@mipmap/ic_icon"
        android:allowBackup="false"
        android:supportsRtl="true"
        android:theme="@style/Theme.MediaBubbles">

        <activity
            android:name=".MainActivity"
            android:exported="true"
            android:launchMode="singleTask"
            android:theme="@style/Theme.MediaBubbles">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>

        <!--
          As in Scropple: the notification-listener grant is only the key that
          unlocks MediaSessionManager. Notification content is never read.
        -->
        <service
            android:name=".media.FloatyListenerService"
            android:exported="false"
            android:label="@string/app_name"
            android:permission="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE">
            <intent-filter>
                <action android:name="android.service.notification.NotificationListenerService"/>
            </intent-filter>
        </service>

        <!-- Hosts the overlay window. Foreground so it survives while another app is in front. -->
        <service
            android:name=".overlay.OverlayService"
            android:exported="false"
            android:foregroundServiceType="specialUse">
            <property
                android:name="android.app.PROPERTY_SPECIAL_USE_FGS_SUBTYPE"
                android:value="Persistent floating media-control bubble drawn over other apps"/>
        </service>

        <!-- Quick Settings tile to toggle the bubble without leaving the map. -->
        <service
            android:name=".tile.BubbleTileService"
            android:exported="true"
            android:icon="@drawable/ic_stat_floaty"
            android:label="@string/tile_label"
            android:permission="android.permission.BIND_QUICK_SETTINGS_TILE">
            <intent-filter>
                <action android:name="android.service.quicksettings.action.QS_TILE"/>
            </intent-filter>
            <meta-data
                android:name="android.service.quicksettings.TOGGLEABLE_TILE"
                android:value="true"/>
        </service>
    </application>
</manifest>