<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- INTERNET for the swarm. The foreground-service pair is what lets the node keep replicating with
the screen off — see the <service> below and spec/architecture.md §7. POST_NOTIFICATIONS is
runtime-requested from API 33: without it the service still RUNS but its notification is not
displayed, i.e. the node would replicate in the background with nothing on screen saying so.
⚠ None of this makes the phone always-on. spec/mobile-node.md §5 is explicit that Doze and OEM
battery managers still win, so the node must be correct while intermittently online rather than
assume it stays up. -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<application
android:name=".MainApplication"
android:label="@string/app_name"
android:allowBackup="false"
android:theme="@style/Theme.AppCompat.DayNight.NoActionBar"
android:networkSecurityConfig="@xml/network_security_config">
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTask"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|uiMode">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- The node's licence to keep running while the app is not on screen. It hosts nothing itself —
the worklet is a thread in this process — so what it buys is that the process is not a cached
process: it survives task-swipe and memory pressure and keeps network access in the
background. See NodeService.kt, and lib/lifecycle.js for the half that stops
react-native-bare-kit suspending the worklet on every screen lock.
stopWithTask=false so swiping the app away leaves the node replicating; the Stop action on the
notification is how a user ends it. -->
<service
android:name=".NodeService"
android:exported="false"
android:stopWithTask="false"
android:foregroundServiceType="dataSync" />
</application>
</manifest>