Cotton code
65 lines · 3.8 KB · HTMLRaw
<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android"    xmlns:tools="http://schemas.android.com/tools">    <!-- The one audio player plays on with the screen off: the shell's AudioService, a media session in the foreground. -->    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />    <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />    <uses-permission android:name="android.permission.WAKE_LOCK" />    <!-- Keep on phone's files come down in the foreground, past the app's end (the shell's Transfers). -->    <uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />    <application android:name="com.cottondb.music.MusicApplication">        <activity            android:name="com.cottondb.music.MainActivity"            android:exported="true"            android:launchMode="singleTask"            android:configChanges="orientation|screenSize|screenLayout|smallestScreenSize|keyboardHidden|uiMode|density|fontScale"            android:windowSoftInputMode="adjustResize">            <intent-filter>                <action android:name="android.intent.action.MAIN" />                <category android:name="android.intent.category.LAUNCHER" />            </intent-filter>            <!-- The share sheet (the shell's ShareIntake; the door that takes it is the core's, share.door): songs, one or many, or an album ZIP. The types are the kit's doors' (a cargo guard holds them to it). -->            <intent-filter>                <action android:name="android.intent.action.SEND" />                <category android:name="android.intent.category.DEFAULT" />                <data android:mimeType="audio/*" />                <data android:mimeType="application/zip" />            </intent-filter>            <intent-filter>                <action android:name="android.intent.action.SEND_MULTIPLE" />                <category android:name="android.intent.category.DEFAULT" />                <data android:mimeType="audio/*" />                <data android:mimeType="application/zip" />            </intent-filter>            <!-- Open with: a file manager or a browser's download handing the app one file. -->            <intent-filter>                <action android:name="android.intent.action.VIEW" />                <category android:name="android.intent.category.DEFAULT" />                <data android:scheme="content" />                <data android:scheme="file" />                <data android:mimeType="audio/*" />                <data android:mimeType="application/zip" />            </intent-filter>            <!-- The app's own links (${urlScheme}://, the iPhone's urlScheme): the core says what each opens (link.open). -->            <intent-filter>                <action android:name="android.intent.action.VIEW" />                <category android:name="android.intent.category.DEFAULT" />                <category android:name="android.intent.category.BROWSABLE" />                <data android:scheme="${urlScheme}" />            </intent-filter>        </activity>        <service            android:name="com.cottondb.shell.player.AudioService"            android:exported="true"            android:foregroundServiceType="mediaPlayback">            <intent-filter>                <action android:name="androidx.media3.session.MediaSessionService" />            </intent-filter>        </service>        <!-- Keep on phone's transfers (the shell's Transfers, WorkManager) stand in the foreground while they run. -->        <service            android:name="androidx.work.impl.foreground.SystemForegroundService"            android:foregroundServiceType="dataSync"            tools:node="merge" />    </application></manifest>