08dc4f5bd4
- FilesScreen: per-file context menu (Open, Share, Rename, Delete), rename dialog, delete confirmation, FileProvider-based open/share intents, Snackbar error feedback - FilesViewModel: FileAction sealed class + SharedFlow; openFile, shareFile, deleteFile, renameFile with DB cleanup; resolveFile handles SAF primary: URIs - FileWatchService: stopWithTask=false keeps watcher alive after app swipe-away; catchupScan on startup detects changes missed while service was not running; SyncFileStateDao injected; FileObserver used for real-path SAF URIs - BootReceiver: handles MY_PACKAGE_REPLACED to restart service after app update - file_paths.xml: added external-path so FileProvider can serve /storage/emulated/0 files - ic_launcher_foreground: three curved stroke-based arrows (quadratic bezier, round caps) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
101 lines
4.5 KiB
XML
101 lines
4.5 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.READ_EXTERNAL_STORAGE" android:maxSdkVersion="32" />
|
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="29" />
|
|
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" tools:ignore="ScopedStorage" />
|
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />
|
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SHORT_SERVICE" />
|
|
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
|
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
|
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
|
|
|
<uses-feature android:name="android.hardware.wifi" android:required="false" />
|
|
|
|
<application
|
|
android:name=".SyncFlowApp"
|
|
android:allowBackup="false"
|
|
android:dataExtractionRules="@xml/data_extraction_rules"
|
|
android:fullBackupContent="@xml/backup_rules"
|
|
android:networkSecurityConfig="@xml/network_security_config"
|
|
android:icon="@mipmap/ic_launcher"
|
|
android:label="@string/app_name"
|
|
android:roundIcon="@mipmap/ic_launcher_round"
|
|
android:supportsRtl="true"
|
|
android:theme="@style/Theme.SyncFlow"
|
|
tools:targetApi="31">
|
|
|
|
<activity
|
|
android:name=".MainActivity"
|
|
android:exported="true"
|
|
android:theme="@style/Theme.SyncFlow.Splash">
|
|
<intent-filter>
|
|
<action android:name="android.intent.action.MAIN" />
|
|
<category android:name="android.intent.category.LAUNCHER" />
|
|
</intent-filter>
|
|
</activity>
|
|
|
|
<!-- OAuth2 redirect handler (Dropbox + OneDrive PKCE) -->
|
|
<activity
|
|
android:name=".ui.auth.OAuthRedirectActivity"
|
|
android:exported="true"
|
|
android:launchMode="singleTask">
|
|
<intent-filter android:autoVerify="false">
|
|
<action android:name="android.intent.action.VIEW" />
|
|
<category android:name="android.intent.category.DEFAULT" />
|
|
<category android:name="android.intent.category.BROWSABLE" />
|
|
<data android:scheme="syncflow" android:host="oauth" />
|
|
</intent-filter>
|
|
</activity>
|
|
|
|
<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>
|
|
|
|
<receiver
|
|
android:name=".worker.BootReceiver"
|
|
android:exported="true">
|
|
<intent-filter>
|
|
<action android:name="android.intent.action.BOOT_COMPLETED" />
|
|
<action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
|
|
</intent-filter>
|
|
</receiver>
|
|
|
|
<!-- File watcher for ON_CHANGE sync pairs -->
|
|
<!-- stopWithTask=false keeps the service alive when the user swipes the app away -->
|
|
<service
|
|
android:name=".worker.FileWatchService"
|
|
android:foregroundServiceType="dataSync|shortService"
|
|
android:stopWithTask="false"
|
|
android:exported="false" />
|
|
|
|
<!-- Required on API 29+ so WorkManager can start a typed foreground service -->
|
|
<service
|
|
android:name="androidx.work.impl.foreground.SystemForegroundService"
|
|
android:foregroundServiceType="dataSync|shortService"
|
|
tools:node="merge" />
|
|
|
|
<!-- Remove WorkManager's default initializer — app uses on-demand init via Configuration.Provider -->
|
|
<provider
|
|
android:name="androidx.startup.InitializationProvider"
|
|
android:authorities="${applicationId}.androidx-startup"
|
|
android:exported="false"
|
|
tools:node="merge">
|
|
<meta-data
|
|
android:name="androidx.work.WorkManagerInitializer"
|
|
android:value="androidx.startup"
|
|
tools:node="remove" />
|
|
</provider>
|
|
|
|
</application>
|
|
</manifest>
|