Skip to content
pubscout

bg_launcher

0.1.0, released 2 years ago by iheb.tech

A flutter plugin that brings an in-background android app to the foreground.

WASM-ready
$ flutter pub add bg_launcher
Source repository

What it does

Brings an Android application running in the background to the foreground. Allows passing optional actions and extras to handle specific logic upon bringing the app forward.

AI-written summary of version 0.1.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to bring your Android app to the foreground from the background.
  • You want to pass custom actions or extras when launching the app from the background.

Skip it when

  • Your target platform includes iOS or other non-Android platforms.
  • You do not want to manage Android background start restrictions or permissions.

Strengths

  • Allows adding extras and actions to determine app behavior when brought to the foreground.
  • Simple API with a single main method.

Weaknesses

  • Android only, does not support other platforms.
  • Subject to Android 10+ background activity start restrictions, requiring SYSTEM_ALERT_WINDOW permission.

Setup

Kind
Plugin (native code)
Effort
Low
Code generation
No
Direct dependencies
1

Add SYSTEM_ALERT_WINDOW permission and have it granted by the user on Android 10 or higher.

BgLauncher.bringAppToForeground(
  action: 'FBI-OPEN-UP',
  extras: {
    "title": "FBI OPEN UP",
    "message": "The FBI is open up!",
  },
);

Alternatives

Packages that do the same job and could replace bg_launcher.

Works with

Packages commonly used together with bg_launcher: ones it builds on, ones built on it, and its own family.