2026-06-03 14:25:20 +02:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2026-09-23 17:28:05 +02:00
|
|
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
|
|
|
xmlns:tools="http://schemas.android.com/tools">
|
2026-06-03 14:25:20 +02:00
|
|
|
|
|
|
|
|
<!-- Networking (MQTT / tile downloads) -->
|
|
|
|
|
<uses-permission android:name="android.permission.INTERNET" />
|
|
|
|
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
|
|
|
|
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
|
2026-07-02 15:04:34 +02:00
|
|
|
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
|
|
|
|
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
|
2026-06-03 14:25:20 +02:00
|
|
|
|
|
|
|
|
<!-- Location -->
|
|
|
|
|
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
2026-09-23 17:28:05 +02:00
|
|
|
<!-- BLE link to the ESP32-C5 (BleLinkTransport). Android 12+ asks for scan/connect at runtime;
|
|
|
|
|
older versions use the legacy pair plus location, which is requested anyway. -->
|
|
|
|
|
<uses-permission android:name="android.permission.BLUETOOTH" android:maxSdkVersion="30" />
|
|
|
|
|
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" android:maxSdkVersion="30" />
|
|
|
|
|
<uses-permission android:name="android.permission.BLUETOOTH_SCAN"
|
|
|
|
|
android:usesPermissionFlags="neverForLocation"
|
|
|
|
|
tools:targetApi="s" />
|
|
|
|
|
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
|
|
|
|
|
<uses-feature android:name="android.hardware.bluetooth_le" android:required="false" />
|
2026-06-03 14:25:20 +02:00
|
|
|
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
|
|
|
|
|
|
|
|
|
<!-- Phase A: foreground service (trip recording) -->
|
|
|
|
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
|
|
|
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SENSOR" />
|
|
|
|
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_LOCATION" />
|
|
|
|
|
|
|
|
|
|
<!-- Notification permission required on Android 13+ -->
|
|
|
|
|
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
|
|
|
|
|
|
|
|
|
<!-- Keep CPU active while recording with screen off -->
|
|
|
|
|
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
|
|
|
|
|
2026-07-02 15:04:34 +02:00
|
|
|
<!-- Allows prompting the user to exempt this app from battery optimization
|
|
|
|
|
so GPS callbacks are not throttled when the screen is off during a trip. -->
|
|
|
|
|
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
|
|
|
|
|
|
2026-06-03 14:25:20 +02:00
|
|
|
<uses-feature android:name="android.hardware.sensor.accelerometer" android:required="false" />
|
|
|
|
|
<uses-feature android:name="android.hardware.sensor.gyroscope" android:required="false" />
|
|
|
|
|
<uses-feature android:name="android.hardware.sensor.compass" android:required="false" />
|
|
|
|
|
<uses-feature android:name="android.hardware.sensor.barometer" android:required="false" />
|
|
|
|
|
|
|
|
|
|
<application
|
|
|
|
|
android:name=".MicrOBUApplication"
|
|
|
|
|
android:allowBackup="true"
|
|
|
|
|
android:icon="@mipmap/ic_launcher"
|
|
|
|
|
android:roundIcon="@mipmap/ic_launcher_round"
|
|
|
|
|
android:label="MicrOBU"
|
|
|
|
|
android:theme="@style/Theme.MicrOBU"
|
|
|
|
|
android:supportsRtl="true"
|
|
|
|
|
android:localeConfig="@xml/locales_config">
|
|
|
|
|
|
|
|
|
|
<activity
|
|
|
|
|
android:name=".MainActivity"
|
|
|
|
|
android:exported="true"
|
|
|
|
|
android:theme="@style/Theme.MicrOBU.Splash">
|
|
|
|
|
<intent-filter>
|
|
|
|
|
<action android:name="android.intent.action.MAIN" />
|
|
|
|
|
<category android:name="android.intent.category.LAUNCHER" />
|
|
|
|
|
</intent-filter>
|
|
|
|
|
</activity>
|
|
|
|
|
|
|
|
|
|
<!-- Phase A: Trip Recording foreground service.
|
|
|
|
|
foregroundServiceType="location" covers the GPS requirement.
|
|
|
|
|
Sensor access (accelerometer / gyroscope) does not have its own
|
|
|
|
|
foregroundServiceType flag; FOREGROUND_SERVICE_SENSOR permission
|
|
|
|
|
in the <uses-permission> block is sufficient for API 34+. -->
|
|
|
|
|
<service
|
|
|
|
|
android:name=".service.TripRecordingService"
|
|
|
|
|
android:foregroundServiceType="location"
|
|
|
|
|
android:exported="false" />
|
|
|
|
|
|
|
|
|
|
<provider
|
|
|
|
|
android:name="androidx.core.content.FileProvider"
|
|
|
|
|
android:authorities="${applicationId}.fileprovider"
|
|
|
|
|
android:exported="false"
|
|
|
|
|
android:grantUriPermissions="true">
|
|
|
|
|
<meta-data
|
|
|
|
|
android:name="android.support.FILE_PROVIDER_PATHS"
|
|
|
|
|
android:resource="@xml/file_paths" />
|
|
|
|
|
</provider>
|
|
|
|
|
|
|
|
|
|
</application>
|
|
|
|
|
|
|
|
|
|
</manifest>
|