1 year ago

#316104

test-img

Philipos D.

Flutter background service not working using android_alarm_manager_plus or flutter_background_fetch

I'm working on a Flutter app only for Android, and I want to register a background service.

I've tried exactly how it's being mentioned on the plugin page, but unfortunately, I cannot make it run properly. android_alarm_manager_plus

The main purpose was to fetch an URL and display notifications (cannot use Google Play Services), but for the moment I would like to see it work, just by having a simple Toast message periodically when the app is closed.

I've also tried with their example and cannot make it run. Tried with Flutter SDK 2.8.0 and 2.10.0, the latest version for android_alarm_manager_plus or older versions, and still cannot make it run.

Does someone else recently had similar issues?

EDIT: I've also tried an alternative using flutter_background_fetch I've open an issue.

Environment:

Plugin version: latest
Platform: Android
OS version: API 30
Device manufacturer / model: emulator
Flutter info (flutter info, flutter doctor):
[✓] Flutter (Channel stable, 2.10.0, on macOS 11.2.2 20D80 darwin-x64, locale en-GI)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc2)
[!] Xcode - develop for iOS and macOS (Xcode 12.4)
! Flutter recommends a minimum Xcode version of 13.
Download the latest version or update via the Mac App Store.
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.1)
[✓] VS Code (version 1.65.1)
[✓] Connected device (3 available)
[✓] HTTP Host Availability

android

flutter

service

background-process

android-alarms

0 Answers

Your Answer

Accepted video resources