fix: promote to foreground service before starting engine (#22517)

fix: show notification from native

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
shenlong 2025-10-07 19:19:43 +05:30 committed by Chaoscontrol
parent 133495a67b
commit 04d5fe1366
11 changed files with 104 additions and 76 deletions

View file

@ -22,6 +22,8 @@ class BackgroundWorkerSettings {
abstract class BackgroundWorkerFgHostApi {
void enable();
void saveNotificationMessage(String title, String body);
void configure(BackgroundWorkerSettings settings);
void disable();
@ -33,8 +35,6 @@ abstract class BackgroundWorkerBgHostApi {
// required platform channels to notify the native side to start the background upload
void onInitialized();
void showNotification(String title, String content);
// Called from the background flutter engine to request the native side to cleanup
void close();
}