Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/x-slayer/bg_launcher
A flutter plugin that brings an in-background android app to the foreground
https://github.com/x-slayer/bg_launcher
android flutter flutter-background flutter-foreground flutter-intent flutter-package
Last synced: 30 days ago
JSON representation
A flutter plugin that brings an in-background android app to the foreground
- Host: GitHub
- URL: https://github.com/x-slayer/bg_launcher
- Owner: X-SLAYER
- License: mit
- Created: 2022-06-13T13:45:53.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-06-14T14:33:59.000Z (over 2 years ago)
- Last Synced: 2024-10-03T08:40:29.022Z (about 2 months ago)
- Topics: android, flutter, flutter-background, flutter-foreground, flutter-intent, flutter-package
- Language: Dart
- Homepage: https://pub.dev/packages/bg_launcher
- Size: 27.3 KB
- Stars: 6
- Watchers: 1
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# bg_launcher
A flutter plugin that brings an in-background android app to the foreground (Android only)
# Restrictions on starting activities from the background
Apps running on Android 10 or higher can start activities only when one or more of the following conditions are met:
* To make the app works try to add `SYSTEM_ALERT_WINDOW` permission and grant it by the user
for more info check here [background-starts#exceptions](https://developer.android.com/guide/components/activities/background-starts#exceptions)## Getting Started
check the example folder for a clearer example
```dart
/// `extras` & `action` are useful if you want to determine
/// what you will do when you bring the app from background
/// you can use `receive_intent` package and filter them with
/// the action & extras to show your own UI/ logic ...
BgLauncher.bringAppToForeground(
action: 'FBI-OPEN-UP',
extras: 'https://youtu.be/dQw4w9WgXcQ',
);```