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
  • flutter_map Installation & Setup
  • fmtc_plus_background_downloading Installation & Setup
  • Background Processes
  • Notification Support
  • fmtc_plus_sharing Installation & Setup
  • Android (11+)
  • iOS

Was this helpful?

Export as PDF
  1. Get Started

Additional Setup

PreviousInstallationNextExample Application

Last updated 2 years ago

Was this helpful?

flutter_map Installation & Setup

You must make sure you follow flutter_map's installation and additional setup instructions.

This module is only supported on Android.

To install this module, follow the Installation instructions for this package.

Background Processes

Add the following to 'android\app\src\main\AndroidManifest.xml' and any other manifests:

AndroidManifest.xml
 <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="packageName">
+    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
+    <uses-permission android:name="android.permission.WAKE_LOCK" />
+    <uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"/>
 <application android:label="appName" android:icon="appIcon">

This will allow the application to acquire the necessary permissions (should the user allow them at runtime) to a background process.

  • FOREGROUND_SERVICE: allows the application to start a foreground service - a type of Android service that can run in the background, as long as the application isn't force stopped.

  • WAKE_LOCK: allows the background process (technically foreground service) to run even when the device is locked/asleep. Also allows the acquisition of a WiFi lock.

  • REQUEST_IGNORE_BATTERY_OPTIMIZATIONS (must be requested at runtime): assists with the background process not being killed by the system.

Notification Support

Background downloading needs to show notifications, which requires a 3rd party package. See it's installation/setup instructions:

To install this module, follow the Installation instructions for this package.

Android (11+)

Please follow these additional instructions for supporting Android versions above 11 and building for release:

iOS

Unfortunately, I do not have the hardware to test this library on Apple platforms. If you find issues, please report them!

It is unknown whether this setup is needed in all cases, so it is recommended to follow these only when you receive errors during building your app.

  • Annotate that access is not needed to the Media, Audio, and Documents directories - this package uses only custom file types. Add these lines to your Podfile just before target 'Runner' do.

    Podfile
    Pod::PICKER_MEDIA = false
    Pod::PICKER_AUDIO = false
    Pod::PICKER_DOCUMENT = false
  • Add UIBackgroundModes capability with the fetch and remote-notifications keys to Xcode, to describe why your app needs to access background tasks - in this case to bulk download maps in the background.

Installation & Setup

Installation & Setup

Some developers may have issues when releasing the app or uploading to TestFlight - see for the first report of this problem. This is due to some of this library's dependencies on platform plugins.

fmtc_plus_background_downloading
fmtc_plus_sharing
issue #69
Installationflutter_map Documentation
flutter_local_notifications | Flutter PackageDart packages
Setup · miguelpruivo/flutter_file_picker WikiGitHub
Logo
Logo
Logo