Skip to content

[JVM]: FLAG_IMMUTABLE or FLAG_MUTABLE is required when a PendingIntent is created #2759

Closed

Description

@PythonLaboratory

Description

When I try to send a notification via the plyer library, I get an error

JVM exception occurred: com.test.test.testservice: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.

I tried to install android.api = 30 (in buildozer.spec), but it didn't change anything

If someone knows how to work around this problem by sending a notification, for example via jnius, then please tell me.

Version

python-for-android: master

Activity

  1. RobertFlatt commented on Feb 26, 2023

    @RobertFlatt
    Contributor

    Plyer is great if it works, But if not, IMHO walk away (nobody here will like that)

    I don't know if it will help you but as an alternative look at this https://github.com/Guhan-SenSam/Android-Notification-in-Python

  2. github-actions commented on Nov 20, 2023

    @github-actions

    👋 We use the issue tracker exclusively for bug reports and feature requests. However, this issue appears to be a support request. Please use our support channels to get help with the project.

    If you're having trouble installing or using python-for-android, maybe you could be interested in our quickstart guide.

    Let us know if this comment was made in error, and we'll be happy to reopen the issue.

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