FMTC Docs
Project Links💝 Support Me
v8
v8
  • flutter_map_tile_caching
  • Is FMTC Right For Me?
  • Get Started
    • Quickstart
    • Installation
    • Additional Setup
    • Example Application
  • Usage
    • Initialisation
    • Using Roots & Stores
      • Management
      • Statistics
      • Metadata
      • Recovery
      • Migrator (v6 -> v7)
    • flutter_map Integration
    • Global Settings
    • Full API Reference
  • Bulk Downloading
    • Introduction
    • 1️⃣Create A Region
    • 2️⃣Prepare For Downloading
    • 3️⃣Start In Foreground
      • Buffering
      • 4️⃣Listen For Progress
    • 3️⃣Start In Background
      • Limitations
    • Cancel Download
  • Import & Export
    • Introduction
    • Importing
    • Exporting
  • Migration
    • v7 -> v8 Migration
    • v6 -> v7 Migration
  • Known Issues
  • Credits
  • flutter_map Docs
Powered by GitBook

© Luka Stillingfleet (JaffaKetchup)

On this page
  • Android Only
  • Background Processes
  • Recovery Effectiveness
  • Progress Events
  • No Buffering Support

Was this helpful?

Export as PDF
  1. Bulk Downloading
  2. Start In Background

Limitations

fmtc_plus_background_downloading Module

PreviousStart In BackgroundNextCancel Download

Last updated 2 years ago

Was this helpful?

Android Only

Unfortunately, background downloading is available on Android only, due to the strict limitations imposed by iOS. This is unlikely to change in the future, especially as I am currently unable to develop for iOS.

In addition, there is no planned support for other platforms.

Background Processes

There is some confusion about the way background process handling works on Android, so let me clear it up for you: it is confusing.

Each vendor (eg. Samsung, Huawei, Motorola) has their own methods of handling background processes.

Some manage it by providing the bare minimum user-end management, resulting in process that drain battery because they can't be stopped easily; others manage it by altogether banning/strictly limiting background processes, resulting in weird problems and buggy apps; many manage it by some layer of control on top of Android's original controls, making things more confusing for everyone.

Therefore there is no guaranteed behaviour when using this functionality. You can see how many vendors will treat background processes here: ; you may wish to link your users to this site so they can properly configure your app to run in the background.

To try and help your users get to the right settings quicker, use the requestIgnoreBatteryOptimizations() method before starting a background download. This will interrupt the app with either a dialog or a settings page where they can opt-in to reduced throttling. There is no guarantee that this will work, but it should help: this is not required and the background download will still try to run even if the user denies the permissions.

Internally, a foreground service is actually used. This allows the service to run as long as the app hasn't been force stopped.

Recovery Effectiveness

The effectiveness of the Recovery system is reduced by background downloading.

If the user leaves the application, then the recovery system may report the ongoing background download as failed, as it has no way of knowing about it. If the user tries to retry the download, both downloads may then fail, and the recovery system may fail also.

There is no way of resolving this situation. You may prefer to disable recovery on background downloads.

Progress Events

Unlike foreground downloading, where you can Listen For Progress, background downloading does not provide any way to do this, so it is much less customisable.

No Buffering Support

Buffering is not supported by background downloads.

The download progress notification only displays the percentage progress and number of tiles attempted/max number of tiles (see ).

3️⃣
dontkillmyapp.com
#available-statistics