summaryrefslogtreecommitdiff
path: root/app/src/main/AndroidManifest.xml
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-08-22 22:42:15 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-08-22 22:42:15 +0000
commitbc891a67802c837d77726f618e68c2ac84ea22d7 (patch)
tree15a4810f8f7ed698b91334e554c949179038e3ee /app/src/main/AndroidManifest.xml
parentef1cec60c91c2481ebad52d2d39da536606a1631 (diff)
Restore the 5am morning-fetch alarm
Reverts part of the previous commit: the explicit refresh button and fetch-on-launch stay, but the user still wants the background 5am alarm so articles are fresh before the app is opened, not just the periodic hourly WorkManager job.
Diffstat (limited to 'app/src/main/AndroidManifest.xml')
-rw-r--r--app/src/main/AndroidManifest.xml20
1 files changed, 20 insertions, 0 deletions
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index a91bd3a..325a2cf 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -3,6 +3,13 @@
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
+ <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
+ <!-- For the 5am morning-fetch alarm (MorningFetchReceiver): lets it wake the device
+ at an exact time even under Doze, without the much broader "ignore battery
+ optimizations" exemption (user explicitly wants battery optimization left on
+ otherwise). Android 12+ requires the user grant this once via Settings; MainActivity
+ prompts for it if not already granted. -->
+ <uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
<application
android:label="@string/app_name"
@@ -40,5 +47,18 @@
</intent-filter>
</activity>
+ <!--
+ Fires the 5am morning fetch (exact alarm, set up by MorningFetchReceiver.scheduleNext,
+ called from MainActivity). Also re-arms that alarm after a reboot: an exact alarm
+ set via AlarmManager does NOT survive a device restart on its own.
+ -->
+ <receiver
+ android:name=".work.MorningFetchReceiver"
+ android:exported="false">
+ <intent-filter>
+ <action android:name="android.intent.action.BOOT_COMPLETED" />
+ </intent-filter>
+ </receiver>
+
</application>
</manifest>