Cotton code
63 lines · 3.6 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">    <!-- Listen: the script read aloud goes on with the screen off (ListenService). -->    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />    <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />    <application android:name="com.cottondb.story.StoryApplication"        android:allowBackup="true"        android:fullBackupContent="@xml/backup_rules"        android:dataExtractionRules="@xml/data_extraction_rules"        tools:replace="android:allowBackup">        <!-- singleTask: a .fountain opened with Story while it is open comes to the one activity (onNewIntent). -->        <activity            android:name="com.cottondb.story.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 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>            <!-- "Open with" on a script file (StoryParts.share brings it in through story.bring_in: Fountain, Final Draft, a printed                 PDF). Content URIs carry no path to match, so the filter takes the types file managers give a screenplay: text,                 Fountain's own, Final Draft's XML, PDF, and the unknown. -->            <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="text/plain" />                <data android:mimeType="text/x-fountain" />                <data android:mimeType="text/fountain" />                <data android:mimeType="application/xml" />                <data android:mimeType="text/xml" />                <data android:mimeType="application/pdf" />                <data android:mimeType="application/octet-stream" />            </intent-filter>            <!-- The share sheet: a screenplay file sent to Story. -->            <intent-filter>                <action android:name="android.intent.action.SEND" />                <category android:name="android.intent.category.DEFAULT" />                <data android:mimeType="text/plain" />                <data android:mimeType="text/x-fountain" />                <data android:mimeType="application/xml" />                <data android:mimeType="text/xml" />                <data android:mimeType="application/pdf" />                <data android:mimeType="application/octet-stream" />            </intent-filter>        </activity>        <service            android:name="com.cottondb.story.listen.ListenService"            android:exported="false"            android:foregroundServiceType="mediaPlayback" />    </application></manifest>