Modern-Apps.git
Publicgit clone https://git.maproj.org/Modern-Apps.gitModern-Apps.git / weather / src / main / AndroidManifest.xml
AndroidManifest.xml178 lines · 8.0 KiBRaw
| 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <manifest xmlns:android="http://schemas.android.com/apk/res/android" |
| 3 | xmlns:tools="http://schemas.android.com/tools"> |
| 4 | |
| 5 | <!-- MAOS: opt out of the GrapheneOS Sensors permission (OTHER_SENSORS). --> |
| 6 | <!-- This app uses no motion/environment sensors; MAOS withholds the --> |
| 7 | <!-- Sensors permission at install instead of auto-granting it. --> |
| 8 | <uses-permission android:name="com.vayunmathur.permission.SENSORS_OPTOUT" /> |
| 9 | |
| 10 | <!-- Single APK for phone and watch. Deliberately NO |
| 11 | android.hardware.type.watch uses-feature here: required="true" |
| 12 | would block every phone install, and required="false" is |
| 13 | disallowed for this feature (lint InvalidWearFeatureAttribute; |
| 14 | Google's packaging model does not support one APK for Wear and |
| 15 | non-Wear via Play). This app does not distribute through Play's |
| 16 | watch channel — it is sideloaded / F-Droid-installed, where no |
| 17 | feature declaration is needed to install on a watch — so the |
| 18 | APK carries no watch feature filter at all and |
| 19 | FormFactor.isWatch (PackageManager.FEATURE_WATCH, still |
| 20 | reported by watch hardware at runtime) routes the experience. --> |
| 21 | <uses-feature |
| 22 | android:name="android.hardware.touchscreen" |
| 23 | android:required="false" /> |
| 24 | |
| 25 | <uses-permission android:name="android.permission.INTERNET" /> |
| 26 | <uses-permission android:name="android.permission.POST_NOTIFICATIONS" /> |
| 27 | <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> |
| 28 | <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> |
| 29 | <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> |
| 30 | |
| 31 | <permission |
| 32 | android:name="com.vayunmathur.weather.permissions.ACCESS_WEATHER" |
| 33 | android:protectionLevel="signature" /> |
| 34 | |
| 35 | <queries> |
| 36 | <package android:name="com.vayunmathur.clock" /> |
| 37 | <package android:name="com.vayunmathur.calendar" /> |
| 38 | <intent> |
| 39 | <action android:name="android.intent.action.SHOW_ALARMS" /> |
| 40 | </intent> |
| 41 | <intent> |
| 42 | <action android:name="android.intent.action.MAIN" /> |
| 43 | <category android:name="android.intent.category.APP_CALENDAR" /> |
| 44 | </intent> |
| 45 | </queries> |
| 46 | |
| 47 | <application |
| 48 | android:allowBackup="true" |
| 49 | android:backupAgent=".platform.AppBackupAgent" |
| 50 | android:dataExtractionRules="@xml/data_extraction_rules" |
| 51 | android:icon="@mipmap/ic_launcher" |
| 52 | android:label="@string/app_name" |
| 53 | android:roundIcon="@mipmap/ic_launcher" |
| 54 | android:supportsRtl="true" |
| 55 | android:theme="@style/Theme.Weather"> |
| 56 | |
| 57 | <!-- Watch experience is paired with the phone app, not standalone. --> |
| 58 | <meta-data |
| 59 | android:name="com.google.android.wearable.standalone" |
| 60 | android:value="false" /> |
| 61 | <meta-data |
| 62 | android:name="com.google.android.gms.car.application" |
| 63 | android:resource="@xml/automotive_app_desc" /> |
| 64 | <activity |
| 65 | android:configChanges="mcc|mnc|colorMode|density|fontScale|fontWeightAdjustment|keyboard|keyboardHidden|layoutDirection|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen|uiMode" |
| 66 | android:name=".MainActivity" |
| 67 | android:exported="true" |
| 68 | android:theme="@style/Theme.Weather"> |
| 69 | <intent-filter> |
| 70 | <action android:name="android.intent.action.MAIN" /> |
| 71 | <category android:name="android.intent.category.LAUNCHER" /> |
| 72 | </intent-filter> |
| 73 | </activity> |
| 74 | |
| 75 | <activity |
| 76 | android:name=".intents.GetWeatherIntent" |
| 77 | android:exported="true" |
| 78 | android:theme="@android:style/Theme.NoDisplay" |
| 79 | android:permission="com.vayunmathur.weather.permissions.ACCESS_WEATHER" /> |
| 80 | |
| 81 | <activity |
| 82 | android:name=".intents.GetWeatherByNameIntent" |
| 83 | android:exported="true" |
| 84 | android:theme="@android:style/Theme.NoDisplay" |
| 85 | android:permission="com.vayunmathur.weather.permissions.ACCESS_WEATHER" /> |
| 86 | |
| 87 | <activity |
| 88 | android:name=".intents.GetForecastIntent" |
| 89 | android:exported="true" |
| 90 | android:theme="@android:style/Theme.NoDisplay" |
| 91 | android:permission="com.vayunmathur.weather.permissions.ACCESS_WEATHER" /> |
| 92 | |
| 93 | <!-- Car hosts (Android Auto / MA Auto) bind to this service by its |
| 94 | CarAppService intent-filter; the host is validated in code via |
| 95 | createHostValidator(), so no manifest permission can be required. --> |
| 96 | <service |
| 97 | android:name=".service.car.WeatherCarAppService" |
| 98 | android:exported="true" |
| 99 | tools:ignore="ExportedService"> |
| 100 | <intent-filter> |
| 101 | <action android:name="androidx.car.app.CarAppService" /> |
| 102 | <category android:name="androidx.car.app.category.WEATHER" /> |
| 103 | </intent-filter> |
| 104 | </service> |
| 105 | |
| 106 | <meta-data |
| 107 | android:name="androidx.car.app.minCarApiLevel" |
| 108 | android:value="1" /> |
| 109 | |
| 110 | <!-- Watch experience: entered only via MainActivity's watch routing |
| 111 | (no launcher filter of its own). Inert on a phone. --> |
| 112 | <activity |
| 113 | android:name=".ui.WearMainActivity" |
| 114 | android:exported="false" |
| 115 | android:taskAffinity="" |
| 116 | android:theme="@android:style/Theme.Material.NoActionBar" /> |
| 117 | |
| 118 | <receiver |
| 119 | android:name=".widget.WeatherGlanceWidgetReceiver" |
| 120 | android:exported="false"> |
| 121 | <intent-filter> |
| 122 | <action android:name="android.appwidget.action.APPWIDGET_UPDATE" /> |
| 123 | </intent-filter> |
| 124 | <meta-data |
| 125 | android:name="android.appwidget.provider" |
| 126 | android:resource="@xml/weather_glance_widget_info" /> |
| 127 | </receiver> |
| 128 | <receiver |
| 129 | android:name=".widget.WeatherBlobGlanceWidgetReceiver" |
| 130 | android:exported="false"> |
| 131 | <intent-filter> |
| 132 | <action android:name="android.appwidget.action.APPWIDGET_UPDATE" /> |
| 133 | </intent-filter> |
| 134 | <meta-data |
| 135 | android:name="android.appwidget.provider" |
| 136 | android:resource="@xml/weather_blob_widget_info" /> |
| 137 | </receiver> |
| 138 | |
| 139 | <!-- Watch conduit scheduled push sync: the phone Watch app fires |
| 140 | ConduitSync.ACTION (signature permission, package-addressed) |
| 141 | and this receiver pushes the current snapshot over the |
| 142 | conduit. Exported only to holders of that permission. --> |
| 143 | <receiver |
| 144 | android:name=".sync.ConduitSyncTriggerReceiver" |
| 145 | android:exported="true" |
| 146 | android:permission="com.vayunmathur.watch.permissions.CONDUIT"> |
| 147 | <intent-filter> |
| 148 | <action android:name="com.vayunmathur.watch.action.SYNC_TRIGGER" /> |
| 149 | </intent-filter> |
| 150 | </receiver> |
| 151 | |
| 152 | <!-- Wear OS Tile (watch-home card): renders from the wear snapshot store. --> |
| 153 | <service |
| 154 | android:name=".service.WeatherTileService" |
| 155 | android:exported="true" |
| 156 | android:icon="@mipmap/ic_launcher" |
| 157 | android:label="Weather"> |
| 158 | <intent-filter> |
| 159 | <action android:name="androidx.wear.tiles.action.BIND_TILE_PROVIDER" /> |
| 160 | </intent-filter> |
| 161 | <meta-data |
| 162 | android:name="androidx.wear.tiles.PREVIEW" |
| 163 | android:resource="@mipmap/ic_launcher" /> |
| 164 | </service> |
| 165 | <!-- Watch "Open on phone" wake: the phone Watch conduit host fires |
| 166 | OpenOnPhoneContract.ACTION (signature permission, package-addressed) |
| 167 | when a watch open request arrives with no live registration in |
| 168 | this app; this receiver launches the main activity. --> |
| 169 | <receiver |
| 170 | android:name=".sync.OpenOnPhoneReceiver" |
| 171 | android:exported="true" |
| 172 | android:permission="com.vayunmathur.watch.permissions.CONDUIT"> |
| 173 | <intent-filter> |
| 174 | <action android:name="com.vayunmathur.watch.action.OPEN_ON_PHONE" /> |
| 175 | </intent-filter> |
| 176 | </receiver> |
| 177 | </application> |
| 178 | </manifest> |