BREAKING: Complete rewrite of data flow to fix network isolation issue. Problem: When connected to Bee's WiFi AP (192.168.0.10), the phone has NO internet access. The Bee AP is just a direct connection to the dashcam with no upstream gateway. The old design tried to simultaneously pull from Bee and push to ADAMaps, which fundamentally couldn't work. Solution: Store-and-forward with two independent subsystems: 1. BeeCollectorService - Collection only - Binds to unvalidated WiFi (Bee AP) - Polls Bee for detections - Stores to local Room database - Does NOT attempt internet uploads 2. AdaMapsUploadWorker - Upload only - WorkManager-based background worker - Only runs when device has VALIDATED internet - Reads from local DB, batch uploads to ADAMaps - Marks as synced, retries with backoff New components: - Room database (DetectionEntity, DetectionDao, VarroaDatabase) - NetworkStateMonitor for tracking validated vs unvalidated networks - Improved UI with BEE/LOCAL/UPLOAD indicators - Manual sync trigger when internet + pending data Version: 1.7.0 (versionCode 7)
50 lines
2.1 KiB
XML
50 lines
2.1 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:tools="http://schemas.android.com/tools">
|
|
|
|
<uses-permission android:name="android.permission.INTERNET" />
|
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
|
<uses-permission android:name="android.permission.ACCESS_WIFI_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" />
|
|
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
|
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
|
|
android:maxSdkVersion="28"
|
|
tools:ignore="ScopedStorage" />
|
|
|
|
<application
|
|
android:name=".VarroaApplication"
|
|
android:allowBackup="true"
|
|
android:icon="@mipmap/ic_launcher"
|
|
android:label="@string/app_name"
|
|
android:supportsRtl="true"
|
|
android:theme="@style/Theme.Varroa"
|
|
android:networkSecurityConfig="@xml/network_security_config"
|
|
android:usesCleartextTraffic="true">
|
|
|
|
<activity
|
|
android:name=".MainActivity"
|
|
android:exported="true"
|
|
android:theme="@style/Theme.Varroa">
|
|
<intent-filter>
|
|
<action android:name="android.intent.action.MAIN" />
|
|
<category android:name="android.intent.category.LAUNCHER" />
|
|
</intent-filter>
|
|
</activity>
|
|
|
|
<!-- v7: New Bee Collector Service (store-and-forward) -->
|
|
<service
|
|
android:name=".service.BeeCollectorService"
|
|
android:exported="false"
|
|
android:foregroundServiceType="dataSync" />
|
|
|
|
<!-- Legacy ForwardingService (deprecated, kept for migration) -->
|
|
<service
|
|
android:name=".service.ForwardingService"
|
|
android:exported="false"
|
|
android:foregroundServiceType="dataSync" />
|
|
|
|
</application>
|
|
|
|
</manifest>
|