Modern-Apps.git
Publicgit clone https://git.maproj.org/Modern-Apps.gitModern-Apps.git / youpipe / src / main / AndroidManifest.xml
AndroidManifest.xml148 lines · 6.8 KiBRaw
| 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <manifest xmlns:android="http://schemas.android.com/apk/res/android"> |
| 3 | |
| 4 | <!-- MAOS: opt out of the GrapheneOS Sensors permission (OTHER_SENSORS). --> |
| 5 | <!-- This app uses no motion/environment sensors; MAOS withholds the --> |
| 6 | <!-- Sensors permission at install instead of auto-granting it. --> |
| 7 | <uses-permission android:name="com.vayunmathur.permission.SENSORS_OPTOUT" /> |
| 8 | |
| 9 | <uses-permission android:name="android.permission.INTERNET" /> |
| 10 | <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> |
| 11 | |
| 12 | <uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> |
| 13 | <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" /> |
| 14 | <uses-permission android:name="android.permission.POST_NOTIFICATIONS" /> |
| 15 | |
| 16 | <uses-permission android:name="com.vayunmathur.cast.permission.STREAM_CONTENT" /> |
| 17 | |
| 18 | <permission |
| 19 | android:name="com.vayunmathur.youpipe.permissions.ACCESS_YOUPIPE" |
| 20 | android:protectionLevel="signature" /> |
| 21 | <!-- The TV remote's volume keys move this phone's media volume, which is the level both ends |
| 22 | share, so it is still there when playback comes back to the phone. --> |
| 23 | <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /> |
| 24 | |
| 25 | <queries> |
| 26 | <package android:name="com.vayunmathur.cast" /> |
| 27 | </queries> |
| 28 | |
| 29 | <!-- Leanback is supported, not required: one APK serves phones and TVs. Without these, |
| 30 | a TV launcher never lists the app; with required="true" phones would lose it. --> |
| 31 | <uses-feature |
| 32 | android:name="android.software.leanback" |
| 33 | android:required="false" /> |
| 34 | <uses-feature |
| 35 | android:name="android.hardware.touchscreen" |
| 36 | android:required="false" /> |
| 37 | |
| 38 | <application |
| 39 | android:name=".YouPipeApplication" |
| 40 | android:allowBackup="true" |
| 41 | android:backupAgent=".platform.AppBackupAgent" |
| 42 | android:banner="@drawable/tv_banner" |
| 43 | android:dataExtractionRules="@xml/data_extraction_rules" |
| 44 | android:icon="@mipmap/ic_launcher" |
| 45 | android:label="@string/app_name" |
| 46 | android:roundIcon="@mipmap/ic_launcher" |
| 47 | android:supportsRtl="true" |
| 48 | android:theme="@style/Theme.General"> |
| 49 | <activity |
| 50 | android:name=".MainActivity" |
| 51 | android:exported="true" |
| 52 | android:supportsPictureInPicture="true" |
| 53 | android:configChanges="mcc|mnc|colorMode|density|fontScale|fontWeightAdjustment|keyboard|keyboardHidden|layoutDirection|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen|uiMode" |
| 54 | android:theme="@style/Theme.General"> |
| 55 | <!-- No autoVerify: youtube.com/youtu.be are Google's domains and |
| 56 | can never publish assetlinks for this app, so verification |
| 57 | would always fail. Plain BROWSABLE handling still applies. --> |
| 58 | <intent-filter> |
| 59 | <action android:name="android.intent.action.VIEW" /> |
| 60 | |
| 61 | <category android:name="android.intent.category.DEFAULT" /> |
| 62 | <category android:name="android.intent.category.BROWSABLE" /> |
| 63 | <data android:scheme="https" /> |
| 64 | <data android:scheme="http" /> |
| 65 | <data android:host="www.youtube.com" /> |
| 66 | <data android:host="youtube.com" /> |
| 67 | <data android:host="m.youtube.com" /> |
| 68 | <data android:host="youtu.be" /> |
| 69 | </intent-filter> |
| 70 | <intent-filter> |
| 71 | <action android:name="android.intent.action.APPLICATION_PREFERENCES" /> |
| 72 | <category android:name="android.intent.category.DEFAULT" /> |
| 73 | </intent-filter> |
| 74 | <intent-filter> |
| 75 | <action android:name="android.intent.action.SEND" /> |
| 76 | <category android:name="android.intent.category.DEFAULT" /> |
| 77 | <data android:mimeType="text/plain" /> |
| 78 | </intent-filter> |
| 79 | <intent-filter> |
| 80 | <action android:name="android.intent.action.MAIN" /> |
| 81 | |
| 82 | <category android:name="android.intent.category.LAUNCHER" /> |
| 83 | </intent-filter> |
| 84 | </activity> |
| 85 | |
| 86 | <!-- |
| 87 | TV entry: a separate activity carrying only LEANBACK_LAUNCHER, so the TV row |
| 88 | opens the D-pad UI instead of the phone pager. Separate activity (not a second |
| 89 | filter on MainActivity): split filters on one activity build separate resolve |
| 90 | entries that confuse launcher resolution (the tvlauncher HOME lesson). |
| 91 | --> |
| 92 | <activity |
| 93 | android:name=".ui.tv.TvMainActivity" |
| 94 | android:configChanges="mcc|mnc|colorMode|density|fontScale|fontWeightAdjustment|keyboard|keyboardHidden|layoutDirection|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen|uiMode" |
| 95 | android:exported="true" |
| 96 | android:launchMode="singleTask" |
| 97 | android:theme="@style/Theme.General"> |
| 98 | <intent-filter> |
| 99 | <action android:name="android.intent.action.MAIN" /> |
| 100 | <category android:name="android.intent.category.LEANBACK_LAUNCHER" /> |
| 101 | </intent-filter> |
| 102 | </activity> |
| 103 | |
| 104 | <activity-alias |
| 105 | android:name=".ShareWatchLater" |
| 106 | android:targetActivity=".MainActivity" |
| 107 | android:exported="true" |
| 108 | android:icon="@mipmap/ic_launcher" |
| 109 | android:label="@string/playlist_watch_later"> |
| 110 | <intent-filter> |
| 111 | <action android:name="android.intent.action.SEND" /> |
| 112 | <category android:name="android.intent.category.DEFAULT" /> |
| 113 | <data android:mimeType="text/plain" /> |
| 114 | </intent-filter> |
| 115 | </activity-alias> |
| 116 | |
| 117 | <activity-alias |
| 118 | android:name=".SharePlaylist" |
| 119 | android:targetActivity=".MainActivity" |
| 120 | android:exported="true" |
| 121 | android:icon="@mipmap/ic_launcher" |
| 122 | android:label="@string/add_to_playlist"> |
| 123 | <intent-filter> |
| 124 | <action android:name="android.intent.action.SEND" /> |
| 125 | <category android:name="android.intent.category.DEFAULT" /> |
| 126 | <data android:mimeType="text/plain" /> |
| 127 | </intent-filter> |
| 128 | </activity-alias> |
| 129 | |
| 130 | <activity |
| 131 | android:name=".intents.GetSubscriptionsLatestIntent" |
| 132 | android:exported="true" |
| 133 | android:theme="@android:style/Theme.NoDisplay" |
| 134 | android:permission="com.vayunmathur.youpipe.permissions.ACCESS_YOUPIPE"> |
| 135 | </activity> |
| 136 | |
| 137 | <service |
| 138 | android:name=".platform.PlaybackService" |
| 139 | android:foregroundServiceType="mediaPlayback" |
| 140 | android:stopWithTask="true" |
| 141 | android:exported="false"> |
| 142 | <intent-filter> |
| 143 | <action android:name="androidx.media3.session.MediaSessionService" /> |
| 144 | </intent-filter> |
| 145 | </service> |
| 146 | </application> |
| 147 | |
| 148 | </manifest> |