Replace receive_sharing_intent; add background upload service; fix add-account login page

Sharing a large file to Noo used to black-screen and silently kick back
to the home screen: receive_sharing_intent copies the entire shared file
into the cache dir synchronously on the main thread before Flutter even
renders, which Android's watchdog eventually kills. Replaced with
hand-rolled handling in MainActivity.kt that only ever reads cheap Uri
metadata up front (ShareIntentService), so the destination picker always
appears instantly regardless of file size.

The destination picker (ShareUploadView) now mirrors the Files tab's own
controls/filters/listing instead of a bare folder list, and the actual
prepare+upload is handed off to ShareUploadService.kt, a real Android
foreground service with a single cancellable progress notification for
the whole batch - this survives the app being closed right after the
user confirms a destination, the same guarantee a file-manager app's own
upload notification gives.

Also fixes the "add another account" login page: it used to open in
url_launcher's bare inAppWebView, which has no close button and can hide
the status bar. LoginWebViewView is a real screen this app owns instead
(package:webview_flutter), with a normal AppBar/close button/safe area,
and can now auto-close itself on successful login.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-16 23:33:55 -04:00
co-authored by Claude Sonnet 5
parent 453aff983a
commit bcc18a7060
13 changed files with 1164 additions and 181 deletions
-15
View File
@@ -19,21 +19,6 @@ subprojects {
project.evaluationDependsOn(":app")
}
// receive_sharing_intent declares Java 11 for its Java sources but leaves
// its Kotlin compilation to default to whatever JDK runs the build - with
// JDK 17 that mismatch (Java 11 vs Kotlin 17) fails with "Inconsistent JVM
// Target Compatibility". Pin just this plugin's Kotlin target down to match
// its own declared Java target, rather than touching every subproject.
project(":receive_sharing_intent") {
afterEvaluate {
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
compilerOptions {
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_11)
}
}
}
}
tasks.register<Delete>("clean") {
delete(rootProject.layout.buildDirectory)
}