Modern-Apps.git
Publicgit clone https://git.maproj.org/Modern-Apps.gitModern-Apps.git / findfamily / src / main / AndroidManifest.xml
AndroidManifest.xml239 lines · 11.6 KiBRaw
| 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"> |
| 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.READ_CONTACTS" android:maxSdkVersion="36"/> |
| 8 | |
| 9 | <uses-permission android:name="android.permission.POST_NOTIFICATIONS" /> |
| 10 | |
| 11 | <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> |
| 12 | <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> |
| 13 | <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" /> |
| 14 | <uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> |
| 15 | <uses-permission android:name="android.permission.FOREGROUND_SERVICE_LOCATION" /> |
| 16 | <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> |
| 17 | |
| 18 | <!-- |
| 19 | The 15-minute active location check (#895 follow-up) has to run in Doze, where the |
| 20 | heartbeat coroutine does not: an exact allow-while-idle alarm wakes the CPU and a short |
| 21 | partial wake lock covers the fix. USE_EXACT_ALARM is install-granted (non-revocable) on |
| 22 | API 33+; SCHEDULE_EXACT_ALARM covers 31-32, where it is granted by default. |
| 23 | FixCeilingAlarm still checks canScheduleExactAlarms() and falls back to an inexact |
| 24 | allow-while-idle alarm armed early enough to stay inside 15 minutes. Distributed via |
| 25 | F-Droid and its own store, so Play's alarm-app-only USE_EXACT_ALARM policy does not |
| 26 | apply (same declaration as calendar and todo). |
| 27 | --> |
| 28 | <uses-permission android:name="android.permission.WAKE_LOCK" /> |
| 29 | <uses-permission android:name="android.permission.USE_EXACT_ALARM" /> |
| 30 | <uses-permission |
| 31 | android:name="android.permission.SCHEDULE_EXACT_ALARM" |
| 32 | android:maxSdkVersion="32" /> |
| 33 | |
| 34 | <!-- |
| 35 | Powered-off finding, finder half. Arming a beacon needs BLUETOOTH_PRIVILEGED, which is |
| 36 | signature|privileged and so only ever available to a preinstalled build — but *hearing* one |
| 37 | is ordinary BLE, and the network is only worth anything if plenty of phones are listening. |
| 38 | So this is declared here rather than in src/dev: an F-Droid install has to be able to |
| 39 | contribute sightings too. Scanning still does nothing until the user opts in |
| 40 | (CROWD_FINDING_ENABLED_KEY, default off). |
| 41 | --> |
| 42 | <uses-permission android:name="android.permission.BLUETOOTH_SCAN" /> |
| 43 | <uses-feature android:name="android.hardware.bluetooth_le" android:required="false" /> |
| 44 | |
| 45 | <!-- Single APK for phone and watch. Deliberately NO |
| 46 | android.hardware.type.watch uses-feature here: required="true" |
| 47 | would block every phone install, and required="false" is |
| 48 | disallowed for this feature (lint InvalidWearFeatureAttribute; |
| 49 | Google's packaging model does not support one APK for Wear and |
| 50 | non-Wear via Play). This app does not distribute through Play's |
| 51 | watch channel — it is sideloaded / F-Droid-installed, where no |
| 52 | feature declaration is needed to install on a watch — so the |
| 53 | APK carries no watch feature filter at all and |
| 54 | FormFactor.isWatch (PackageManager.FEATURE_WATCH, still |
| 55 | reported by watch hardware at runtime) routes the experience. --> |
| 56 | <uses-feature |
| 57 | android:name="android.hardware.touchscreen" |
| 58 | android:required="false" /> |
| 59 | |
| 60 | <uses-permission android:name="android.permission.RANGING" /> |
| 61 | <!-- Powered-off finding (NearbyManager#setPoweredOffFindingEphemeralIds). signature|privileged, |
| 62 | so this is only actually granted when findfamily is installed as a MAOS priv-app with a |
| 63 | matching privapp-permissions entry; everywhere else the calls throw SecurityException and |
| 64 | PoweredOffBeacon treats the feature as absent. Requesting it here is harmless either way. --> |
| 65 | <!-- BLUETOOTH_PRIVILEGED is signature|privileged: only granted on MAOS priv-app installs; elsewhere the calls throw SecurityException and PoweredOffBeacon treats the feature as absent (see comment above). --> |
| 66 | <!-- lint: declaration is intentional for priv-app builds. --> |
| 67 | <uses-permission android:name="android.permission.BLUETOOTH_PRIVILEGED" tools:ignore="ProtectedPermissions" /> |
| 68 | <uses-feature android:name="android.hardware.uwb" android:required="false" /> |
| 69 | |
| 70 | <permission |
| 71 | android:name="com.vayunmathur.findfamily.permissions.ACCESS_FAMILY" |
| 72 | android:protectionLevel="signature" /> |
| 73 | |
| 74 | <application |
| 75 | android:allowBackup="true" |
| 76 | android:backupAgent=".platform.AppBackupAgent" |
| 77 | android:dataExtractionRules="@xml/data_extraction_rules" |
| 78 | android:icon="@mipmap/ic_launcher" |
| 79 | android:label="@string/app_name" |
| 80 | android:roundIcon="@mipmap/ic_launcher" |
| 81 | android:supportsRtl="true" |
| 82 | android:theme="@style/Theme.General"> |
| 83 | |
| 84 | <!-- Watch experience is paired with the phone app, not standalone. --> |
| 85 | <meta-data |
| 86 | android:name="com.google.android.wearable.standalone" |
| 87 | android:value="false" /> |
| 88 | <activity |
| 89 | android:configChanges="mcc|mnc|colorMode|density|fontScale|fontWeightAdjustment|keyboard|keyboardHidden|layoutDirection|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen|uiMode" |
| 90 | android:name=".MainActivity" |
| 91 | android:exported="true" |
| 92 | android:launchMode="singleTop" |
| 93 | android:theme="@style/Theme.General"> |
| 94 | <intent-filter> |
| 95 | <action android:name="android.intent.action.MAIN" /> |
| 96 | |
| 97 | <category android:name="android.intent.category.LAUNCHER" /> |
| 98 | </intent-filter> |
| 99 | <intent-filter> |
| 100 | <action android:name="android.intent.action.VIEW" /> |
| 101 | |
| 102 | <category android:name="android.intent.category.DEFAULT" /> |
| 103 | <category android:name="android.intent.category.BROWSABLE" /> |
| 104 | |
| 105 | <data android:scheme="findfamily" android:host="add" /> |
| 106 | </intent-filter> |
| 107 | <!-- Long-pressing a Quick Settings tile resolves this action; without it the |
| 108 | system falls back to the App Info page (GitHub #545). --> |
| 109 | <intent-filter> |
| 110 | <action android:name="android.service.quicksettings.action.QS_TILE_PREFERENCES" /> |
| 111 | |
| 112 | <category android:name="android.intent.category.DEFAULT" /> |
| 113 | </intent-filter> |
| 114 | </activity> |
| 115 | |
| 116 | <service |
| 117 | android:name=".platform.LocationTrackingService" |
| 118 | android:foregroundServiceType="location" |
| 119 | android:directBootAware="true" |
| 120 | android:exported="false" /> |
| 121 | |
| 122 | <service |
| 123 | android:name=".service.FamilyLocationService" |
| 124 | android:exported="true" |
| 125 | android:permission="com.vayunmathur.findfamily.permissions.ACCESS_FAMILY"> |
| 126 | <intent-filter> |
| 127 | <action android:name="com.vayunmathur.findfamily.action.FAMILY_LOCATIONS" /> |
| 128 | </intent-filter> |
| 129 | </service> |
| 130 | |
| 131 | <service |
| 132 | android:name=".service.TrackingTileService" |
| 133 | android:exported="true" |
| 134 | android:icon="@drawable/ic_tile_tracking" |
| 135 | android:label="@string/tile_label" |
| 136 | android:permission="android.permission.BIND_QUICK_SETTINGS_TILE"> |
| 137 | <intent-filter> |
| 138 | <action android:name="android.service.quicksettings.action.QS_TILE" /> |
| 139 | </intent-filter> |
| 140 | <meta-data |
| 141 | android:name="android.service.quicksettings.ACTIVITY" |
| 142 | android:value=".MainActivity" /> |
| 143 | </service> |
| 144 | |
| 145 | <service |
| 146 | android:name=".service.SharingTileService" |
| 147 | android:exported="true" |
| 148 | android:icon="@drawable/ic_tile_sharing" |
| 149 | android:label="@string/sharing_tile_label" |
| 150 | android:permission="android.permission.BIND_QUICK_SETTINGS_TILE"> |
| 151 | <intent-filter> |
| 152 | <action android:name="android.service.quicksettings.action.QS_TILE" /> |
| 153 | </intent-filter> |
| 154 | <meta-data |
| 155 | android:name="android.service.quicksettings.ACTIVITY" |
| 156 | android:value=".MainActivity" /> |
| 157 | </service> |
| 158 | |
| 159 | |
| 160 | <receiver |
| 161 | android:name=".platform.FixCeilingReceiver" |
| 162 | android:directBootAware="true" |
| 163 | android:exported="false" /> |
| 164 | |
| 165 | <receiver |
| 166 | android:name=".platform.BootReceiver" |
| 167 | android:directBootAware="true" |
| 168 | android:exported="false"> |
| 169 | <intent-filter> |
| 170 | <action android:name="android.intent.action.LOCKED_BOOT_COMPLETED" /> |
| 171 | <action android:name="android.intent.action.BOOT_COMPLETED" /> |
| 172 | <action android:name="android.intent.action.MY_PACKAGE_REPLACED" /> |
| 173 | </intent-filter> |
| 174 | </receiver> |
| 175 | |
| 176 | <!-- Watch experience: entered only via MainActivity's watch routing |
| 177 | (no launcher filter of its own). It renders only the locally |
| 178 | stored phone snapshot, so it stays inert on a phone. --> |
| 179 | <activity |
| 180 | android:name=".ui.WearMainActivity" |
| 181 | android:exported="false" |
| 182 | android:taskAffinity="" |
| 183 | android:theme="@android:style/Theme.Material.NoActionBar" /> |
| 184 | |
| 185 | <activity |
| 186 | android:name=".intents.GetIntent" |
| 187 | android:exported="true" |
| 188 | android:theme="@android:style/Theme.NoDisplay" |
| 189 | android:permission="com.vayunmathur.findfamily.permissions.ACCESS_FAMILY"> |
| 190 | </activity> |
| 191 | |
| 192 | <activity |
| 193 | android:name=".intents.CreateLinkIntent" |
| 194 | android:exported="true" |
| 195 | android:theme="@android:style/Theme.NoDisplay" |
| 196 | android:permission="com.vayunmathur.findfamily.permissions.ACCESS_FAMILY"> |
| 197 | </activity> |
| 198 | |
| 199 | <!-- Watch conduit scheduled push sync: the phone Watch app fires |
| 200 | ConduitSync.ACTION (signature permission, package-addressed) |
| 201 | and this receiver pushes the current snapshot over the |
| 202 | conduit. Exported only to holders of that permission. --> |
| 203 | <receiver |
| 204 | android:name=".sync.ConduitSyncTriggerReceiver" |
| 205 | android:exported="true" |
| 206 | android:permission="com.vayunmathur.watch.permissions.CONDUIT"> |
| 207 | <intent-filter> |
| 208 | <action android:name="com.vayunmathur.watch.action.SYNC_TRIGGER" /> |
| 209 | </intent-filter> |
| 210 | </receiver> |
| 211 | |
| 212 | <!-- Wear OS Tile (watch-home card): renders from the wear snapshot store. --> |
| 213 | <service |
| 214 | android:name=".service.FindFamilyTileService" |
| 215 | android:exported="true" |
| 216 | android:icon="@mipmap/ic_launcher" |
| 217 | android:label="FindFamily"> |
| 218 | <intent-filter> |
| 219 | <action android:name="androidx.wear.tiles.action.BIND_TILE_PROVIDER" /> |
| 220 | </intent-filter> |
| 221 | <meta-data |
| 222 | android:name="androidx.wear.tiles.PREVIEW" |
| 223 | android:resource="@mipmap/ic_launcher" /> |
| 224 | </service> |
| 225 | <!-- Watch "Open on phone" wake: the phone Watch conduit host fires |
| 226 | OpenOnPhoneContract.ACTION (signature permission, package-addressed) |
| 227 | when a watch open request arrives with no live registration in |
| 228 | this app; this receiver launches the main activity. --> |
| 229 | <receiver |
| 230 | android:name=".sync.OpenOnPhoneReceiver" |
| 231 | android:exported="true" |
| 232 | android:permission="com.vayunmathur.watch.permissions.CONDUIT"> |
| 233 | <intent-filter> |
| 234 | <action android:name="com.vayunmathur.watch.action.OPEN_ON_PHONE" /> |
| 235 | </intent-filter> |
| 236 | </receiver> |
| 237 | </application> |
| 238 | |
| 239 | </manifest> |