fluttercommunity / fluttercommunity/plus_plugins
[Request]: Add support for background activity launch
- Dominant language
- Dart
- Stars
- 1.9k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
### Plugin
android_intent_plus
### Use case
targeting Android 15 or higher will default to no longer implicitly granting background activity launch (BAL) privileges to PendingIntents they create. Explicit opt-in is required
due to this activity launch fails without any error, there should be way to opt in for BAL, native android allows it using:
```
val options = ActivityOptions.makeBasic()
options.setPendingIntentBackgroundActivityStartMode(
ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS
)
context.startActivity(intent, options.toBundle())
```
### Proposal
```
final AndroidIntent intent = AndroidIntent(
action: '....',
data: '....',
/// Add option to pass
backgroundActivityStartMode: ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED
);
await intent.launch();
```
Contributor guide
Assessment
This issue has not been assessed yet.