Modern Apps git
git clone https://git.maproj.org/Modern-Apps.git
cov/c3 ▾

Modern-Apps.git / youpipe / src / main / AndroidManifest.xml

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