Modern-Apps.git
Publicgit clone https://git.maproj.org/Modern-Apps.gitModern-Apps.git / health / src / main / AndroidManifest.xml
AndroidManifest.xml197 lines · 10.3 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 | <!-- Offline app (#884): androidx.work merges in ACCESS_NETWORK_STATE, which nothing here uses. --> |
| 6 | <!-- MAOS: opt out of the GrapheneOS Sensors permission (OTHER_SENSORS). --> |
| 7 | <!-- This app uses no motion/environment sensors; MAOS withholds the --> |
| 8 | <!-- Sensors permission at install instead of auto-granting it. --> |
| 9 | <uses-permission android:name="com.vayunmathur.permission.SENSORS_OPTOUT" /> |
| 10 | |
| 11 | <!-- Assistant tool (health_get_metric_summary) for openassistant. |
| 12 | Signature-level: only apps signed with the Modern Apps key can call. --> |
| 13 | <permission |
| 14 | android:name="com.vayunmathur.health.permissions.ACCESS_HEALTH" |
| 15 | android:protectionLevel="signature" /> |
| 16 | |
| 17 | <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" tools:node="remove" /> |
| 18 | |
| 19 | |
| 20 | <uses-permission android:name="android.permission.health.READ_STEPS" /> |
| 21 | <uses-permission android:name="android.permission.health.READ_WHEELCHAIR_PUSHES" /> |
| 22 | <uses-permission android:name="android.permission.health.READ_DISTANCE" /> |
| 23 | <uses-permission android:name="android.permission.health.READ_TOTAL_CALORIES_BURNED" /> |
| 24 | <uses-permission android:name="android.permission.health.READ_ACTIVE_CALORIES_BURNED" /> |
| 25 | <uses-permission android:name="android.permission.health.READ_BASAL_METABOLIC_RATE" /> |
| 26 | <uses-permission android:name="android.permission.health.READ_FLOORS_CLIMBED" /> |
| 27 | <uses-permission android:name="android.permission.health.READ_ELEVATION_GAINED" /> |
| 28 | |
| 29 | <uses-permission android:name="android.permission.health.READ_HEART_RATE" /> |
| 30 | <uses-permission android:name="android.permission.health.READ_RESTING_HEART_RATE" /> |
| 31 | <uses-permission android:name="android.permission.health.READ_HEART_RATE_VARIABILITY" /> |
| 32 | <uses-permission android:name="android.permission.health.READ_RESPIRATORY_RATE" /> |
| 33 | <uses-permission android:name="android.permission.health.READ_OXYGEN_SATURATION" /> |
| 34 | <uses-permission android:name="android.permission.health.READ_BLOOD_PRESSURE" /> |
| 35 | <uses-permission android:name="android.permission.health.READ_BLOOD_GLUCOSE" /> |
| 36 | <uses-permission android:name="android.permission.health.READ_VO2_MAX" /> |
| 37 | <uses-permission android:name="android.permission.health.READ_SKIN_TEMPERATURE" /> |
| 38 | |
| 39 | <uses-permission android:name="android.permission.health.READ_WEIGHT" /> |
| 40 | <uses-permission android:name="android.permission.health.READ_HEIGHT" /> |
| 41 | <uses-permission android:name="android.permission.health.READ_BODY_FAT" /> |
| 42 | <uses-permission android:name="android.permission.health.READ_LEAN_BODY_MASS" /> |
| 43 | <uses-permission android:name="android.permission.health.READ_BONE_MASS" /> |
| 44 | <uses-permission android:name="android.permission.health.READ_BODY_WATER_MASS" /> |
| 45 | <uses-permission android:name="android.permission.health.WRITE_WEIGHT" /> |
| 46 | <uses-permission android:name="android.permission.health.WRITE_HEIGHT" /> |
| 47 | <uses-permission android:name="android.permission.health.WRITE_BODY_FAT" /> |
| 48 | <uses-permission android:name="android.permission.health.WRITE_LEAN_BODY_MASS" /> |
| 49 | <uses-permission android:name="android.permission.health.WRITE_BONE_MASS" /> |
| 50 | <uses-permission android:name="android.permission.health.WRITE_BODY_WATER_MASS" /> |
| 51 | |
| 52 | <uses-permission android:name="android.permission.health.READ_EXERCISE" /> |
| 53 | |
| 54 | <uses-permission android:name="android.permission.health.READ_SLEEP" /> |
| 55 | <uses-permission android:name="android.permission.health.READ_MINDFULNESS" /> |
| 56 | <uses-permission android:name="android.permission.health.READ_HYDRATION" /> |
| 57 | <uses-permission android:name="android.permission.health.READ_NUTRITION" /> |
| 58 | <uses-permission android:name="android.permission.health.WRITE_HYDRATION" /> |
| 59 | <uses-permission android:name="android.permission.health.WRITE_NUTRITION" /> |
| 60 | <uses-permission android:name="android.permission.health.READ_HEALTH_DATA_IN_BACKGROUND" /> |
| 61 | |
| 62 | <!-- |
| 63 | Personal Health Record (FHIR) access, for the Medication and Medical History screens. |
| 64 | |
| 65 | Deliberately kept out of the PERMISSIONS set MainActivity gates the whole app on: these are |
| 66 | only grantable on Android 15 with an updated Health Connect module, and requiring them up |
| 67 | front would put every older device behind a permission wall it can never pass. Both screens |
| 68 | work from the local database when these are absent. |
| 69 | --> |
| 70 | <uses-permission android:name="android.permission.health.WRITE_MEDICAL_DATA" /> |
| 71 | <uses-permission android:name="android.permission.health.READ_MEDICAL_DATA_VACCINES" /> |
| 72 | <uses-permission android:name="android.permission.health.READ_MEDICAL_DATA_MEDICATIONS" /> |
| 73 | <uses-permission android:name="android.permission.health.READ_MEDICAL_DATA_ALLERGIES_INTOLERANCES" /> |
| 74 | <uses-permission android:name="android.permission.health.READ_MEDICAL_DATA_CONDITIONS" /> |
| 75 | <uses-permission android:name="android.permission.health.READ_MEDICAL_DATA_LABORATORY_RESULTS" /> |
| 76 | <uses-permission android:name="android.permission.health.READ_MEDICAL_DATA_PREGNANCY" /> |
| 77 | <uses-permission android:name="android.permission.health.READ_MEDICAL_DATA_SOCIAL_HISTORY" /> |
| 78 | <uses-permission android:name="android.permission.health.READ_MEDICAL_DATA_PERSONAL_DETAILS" /> |
| 79 | |
| 80 | <uses-permission android:name="com.vayunmathur.openassistant.permission.ACCESS_INFERENCE" /> |
| 81 | |
| 82 | <!-- |
| 83 | Medication dose reminders. |
| 84 | |
| 85 | Deliberately no SCHEDULE_EXACT_ALARM or USE_EXACT_ALARM: a dose reminder does not need to be |
| 86 | punctual to the second, so DoseScheduler uses setAndAllowWhileIdle. That keeps the app out of |
| 87 | the "Alarms & reminders" settings screen entirely. |
| 88 | |
| 89 | USE_FULL_SCREEN_INTENT is auto-granted only to calling and alarm apps on Android 14+, which |
| 90 | this is not, so the schedule editor offers the user a way to grant it. Without it the reminder |
| 91 | still arrives, as a heads-up notification rather than a screen takeover. |
| 92 | --> |
| 93 | <uses-permission android:name="android.permission.POST_NOTIFICATIONS" /> |
| 94 | <uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" /> |
| 95 | <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> |
| 96 | <uses-permission android:name="android.permission.VIBRATE" /> |
| 97 | <uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> |
| 98 | <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" /> |
| 99 | |
| 100 | <queries> |
| 101 | <package android:name="com.vayunmathur.openassistant" /> |
| 102 | <!-- Health Connect's APK provider on API 33 and below. Without this, package-visibility |
| 103 | rules hide the provider and getSdkStatus() cannot see it. --> |
| 104 | <package android:name="com.google.android.apps.healthdata" /> |
| 105 | </queries> |
| 106 | |
| 107 | <application |
| 108 | android:allowBackup="true" |
| 109 | android:backupAgent=".platform.AppBackupAgent" |
| 110 | android:dataExtractionRules="@xml/data_extraction_rules" |
| 111 | android:icon="@mipmap/ic_launcher" |
| 112 | android:label="@string/app_name" |
| 113 | android:roundIcon="@mipmap/ic_launcher" |
| 114 | android:supportsRtl="true" |
| 115 | android:theme="@style/Theme.General"> |
| 116 | <activity |
| 117 | android:configChanges="mcc|mnc|colorMode|density|fontScale|fontWeightAdjustment|keyboard|keyboardHidden|layoutDirection|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen|uiMode" |
| 118 | android:name=".MainActivity" |
| 119 | android:exported="true" |
| 120 | android:theme="@style/Theme.General"> |
| 121 | <intent-filter> |
| 122 | <action android:name="android.intent.action.MAIN" /> |
| 123 | |
| 124 | <category android:name="android.intent.category.LAUNCHER" /> |
| 125 | </intent-filter> |
| 126 | </activity> |
| 127 | |
| 128 | <activity |
| 129 | android:name=".ui.PermissionsRationaleActivity" |
| 130 | android:exported="true"> |
| 131 | <intent-filter> |
| 132 | <action android:name="androidx.health.ACTION_SHOW_PERMISSIONS_RATIONALE" /> |
| 133 | </intent-filter> |
| 134 | </activity> |
| 135 | |
| 136 | <activity-alias |
| 137 | android:name="ViewPermissionUsageActivity" |
| 138 | android:exported="true" |
| 139 | android:targetActivity=".ui.PermissionsRationaleActivity" |
| 140 | android:permission="android.permission.START_VIEW_PERMISSION_USAGE"> |
| 141 | <intent-filter> |
| 142 | <action android:name="android.intent.action.VIEW_PERMISSION_USAGE" /> |
| 143 | <category android:name="android.intent.category.HEALTH_PERMISSIONS" /> |
| 144 | </intent-filter> |
| 145 | </activity-alias> |
| 146 | |
| 147 | <provider |
| 148 | android:name="androidx.core.content.FileProvider" |
| 149 | android:authorities="${applicationId}.fileprovider" |
| 150 | android:exported="false" |
| 151 | android:grantUriPermissions="true"> |
| 152 | <meta-data |
| 153 | android:name="android.support.FILE_PROVIDER_PATHS" |
| 154 | android:resource="@xml/file_paths" /> |
| 155 | </provider> |
| 156 | |
| 157 | <activity |
| 158 | android:name=".intents.GetMetricSummaryIntent" |
| 159 | android:exported="true" |
| 160 | android:theme="@android:style/Theme.NoDisplay" |
| 161 | android:permission="com.vayunmathur.health.permissions.ACCESS_HEALTH" /> |
| 162 | |
| 163 | <activity |
| 164 | android:name=".platform.DoseReminderActivity" |
| 165 | android:showWhenLocked="true" |
| 166 | android:turnScreenOn="true" |
| 167 | android:excludeFromRecents="true" |
| 168 | android:exported="false" |
| 169 | android:launchMode="singleInstance" /> |
| 170 | |
| 171 | <receiver |
| 172 | android:name=".platform.DoseReceiver" |
| 173 | android:exported="false" /> |
| 174 | |
| 175 | <receiver |
| 176 | android:name=".platform.DoseActionReceiver" |
| 177 | android:exported="false" /> |
| 178 | |
| 179 | <receiver |
| 180 | android:name=".platform.HealthBootReceiver" |
| 181 | android:exported="false"> |
| 182 | <intent-filter> |
| 183 | <action android:name="android.intent.action.BOOT_COMPLETED" /> |
| 184 | <action android:name="android.intent.action.MY_PACKAGE_REPLACED" /> |
| 185 | <action android:name="android.intent.action.TIMEZONE_CHANGED" /> |
| 186 | <action android:name="android.intent.action.TIME_SET" /> |
| 187 | </intent-filter> |
| 188 | </receiver> |
| 189 | |
| 190 | <service |
| 191 | android:name=".service.DoseSoundService" |
| 192 | android:foregroundServiceType="mediaPlayback" |
| 193 | android:exported="false" /> |
| 194 | |
| 195 | </application> |
| 196 | |
| 197 | </manifest> |