-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathAndroidManifest.xml
More file actions
108 lines (90 loc) · 6.32 KB
/
Copy pathAndroidManifest.xml
File metadata and controls
108 lines (90 loc) · 6.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<?xml version="1.0" encoding="utf-8"?>
<!--
AndroidManifest.xml — Play Store readiness review (2026-06-30)
Target SDK: MAUI net10.0-android defaults to Android 15 (API 35), meeting the Play Store
requirement of targeting API 35 (mandatory for new apps and updates from August 31 2025).
minSdkVersion is controlled by <SupportedOSPlatformVersion android="24.0"> in the csproj.
Cleartext traffic (telnet): Android's usesCleartextTraffic and networkSecurityConfig ONLY
restrict HTTP/HTTPS connections made through framework HTTP APIs (HttpURLConnection, OkHttp).
Raw TCP sockets (including telnet) bypass this policy entirely. No cleartext flag is needed.
Backup: allowBackup="false" because SharpClient stores connection credentials (host, port,
character name) in SQLite. Backing these up to Google Drive via Auto Backup without an
explicit dataExtractionRules exclusion list would expose credentials. Opt out entirely until
a proper backup policy (excluding the credentials DB) is authored.
Foreground service type: connectedDevice (API 29+, declared in <service> below).
See ConnectionKeepAliveService.cs for the type-selection rationale.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:label="SharpClient"
android:icon="@mipmap/appicon"
android:roundIcon="@mipmap/appicon_round"
android:supportsRtl="true"
android:allowBackup="false">
<!--
android:label — display name shown on the launcher and in Settings.
The ApplicationTitle in the csproj retains the default template value;
this attribute overrides it for Android.
android:icon / android:roundIcon — resolved from MAUI's adaptive-icon generation
triggered by <MauiIcon Include="Resources\AppIcon\appicon.svg"
ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#0b0e12" />.
MAUI places the generated mipmap files at mipmap-*/appicon.png and
mipmap-*/appicon_round.png, matching these references.
android:allowBackup="false" — see header comment.
MainActivity android:exported — not declared here; the [Activity(MainLauncher=true)]
attribute in MainActivity.cs causes MAUI's manifest merger to emit
android:exported="true" automatically (required for Android 12+ / API 31).
-->
<!--
ConnectionKeepAliveService
──────────────────────────
Started foreground service that maintains the TCP socket connection through
Android Doze and battery-saver. This manifest entry adds foregroundServiceType
(API 29+, mandatory from API 34) to the entry that the C# [Service] attribute
generates; the two entries are merged by MAUI's Android manifest merger on android:name.
foregroundServiceType="connectedDevice"
Appropriate for a service that connects to a remote host over the network
(Android docs: "connected through Bluetooth, NFC, IR, USB, or **network**").
Unlike dataSync, connectedDevice has no 6-hour per-24-hours time cap (Android 15),
making it suitable for all-day MUSH sessions.
Required permission: FOREGROUND_SERVICE_CONNECTED_DEVICE (below).
android:exported="false" — the service is only started by this app, never by external
components. Explicit declaration required for Android 12+ (API 31).
-->
<service
android:name="com.sharpmush.sharpclient.ConnectionKeepAliveService"
android:exported="false"
android:foregroundServiceType="connectedDevice" />
</application>
<!-- ── Permissions ──────────────────────────────────────────────────────── -->
<!-- Network access for raw TCP connections to MUSH servers -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<!--
Foreground-service permissions required when using connectedDevice:
FOREGROUND_SERVICE — required for any foreground service (all API levels).
FOREGROUND_SERVICE_CONNECTED_DEVICE
— required from Android 14 (API 34) when
foregroundServiceType="connectedDevice" is declared.
CHANGE_NETWORK_STATE — from Android 15 (API 35+), starting a connectedDevice
foreground service ALSO requires at least one "companion"
permission from a fixed set (BLUETOOTH_*, CHANGE_NETWORK_STATE,
CHANGE_WIFI_STATE, NFC, ...). Without one, startForeground()
throws SecurityException and the app crashes. We declare
CHANGE_NETWORK_STATE because the keep-alive service registers a
ConnectivityManager.NetworkCallback and acts on network state;
it is a normal (auto-granted) permission, no runtime prompt.
POST_NOTIFICATIONS — required from Android 13 (API 33) to post the mandatory
persistent notification that a foreground service must show.
On API < 33 this permission is silently ignored.
-->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_CONNECTED_DEVICE" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<!--
WAKE_LOCK — the keep-alive service holds a PARTIAL_WAKE_LOCK so the CPU keeps the TCP
socket and telnet-NOP keepalive alive while the screen is off / the device dozes.
-->
<uses-permission android:name="android.permission.WAKE_LOCK" />
</manifest>