Skip to content

[Request]: Add support for background activity launch #3688

Description

@dimiltagline

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();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions