Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Runtime error when starting background activity on Android 15 #330

Merged
merged 4 commits into from
Feb 6, 2025

Conversation

Paitomax
Copy link
Contributor

@Paitomax Paitomax commented Feb 5, 2025

Description

This PR fixes a runtime error in HomeWidgetLaunchIntent when attempting to start a background activity on Android 15. Due to new system restrictions (as documented here), the configuration of pendingIntentBackgroundActivityStartMode needs to be handled differently depending on the Android version.

Checklist

  • I have updated/added tests for ALL new/updated/fixed functionality.
  • I have updated/added relevant documentation and added code (documentation) comments where necessary.
  • I have updated/added relevant examples in example or documentation.

Breaking Change?

  • Yes, this PR is a breaking change.
  • No, this PR is not a breaking change.

Related Issues

Closes #303 #328

Copy link

docs-page bot commented Feb 5, 2025

To view this pull requests documentation preview, visit the following URL:

docs.page/abausg/home_widget~330

Documentation is deployed and generated using docs.page.

@Paitomax Paitomax changed the title fix: Fix runtime error when starting background activity on Android 15 fix: Runtime error when starting background activity on Android 15 Feb 5, 2025
@naamapps
Copy link

naamapps commented Feb 6, 2025

@ABausG
Please merge this PR, the package doesn't work on Android 15, and makes our apps crash.
Hope this can be handled soon.

Copy link
Owner

@ABausG ABausG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of small questions only

Copy link
Owner

@ABausG ABausG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good now!

Think the Pipeline is failing because of malformatted Koglin code
Can you run.

ktfmt .

(I have to fix the pipeline to actually report on the failing output step)

Copy link
Owner

@ABausG ABausG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the fix and the collaboration on this 🫶

@ABausG ABausG merged commit 64a38eb into ABausG:main Feb 6, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants