Pb sending notification using plyer in android app

174 views
Skip to first unread message

Ced B

unread,
Feb 26, 2023, 6:06:07 PM2/26/23
to Kivy users support
Hello,
In a small kivy app, I' d like to send notifications on an android device running android 13.
The function call in the app is :


plyer.notification.notify(title="Title",message="Notification")

The app is built with buildozer on WSL2.
I get at runtime on an android device the following message:






02-26 23:40:58.581 20319 20401 I python : jnius.jnius.JavaException: JVM exception occurred: ced.bart.bourse: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. 02-26 23:40:58.581 20319 20401 I python : 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. java.lang.IllegalArgumentException 02-26 23:40:58.581 20319 20401 I python : Python for android ended.
Thanks for your help
The function call within kivy app is: plyer.notification.notify(title="Title",message="Notification")
Thanks for your help !
If there's a simple way to send notification, thanks for letting me know
Cedric

Robert

unread,
Feb 26, 2023, 6:40:42 PM2/26/23
to Kivy users support
Known issue https://github.com/kivy/python-for-android/issues/2759

Plyer is great if it works, but it is poorly maintained and commonly doesn't work.
Best advice, try something else; perhaps as suggested in that link.

Ced B

unread,
Mar 1, 2023, 2:10:14 PM3/1/23
to Kivy users support



Thanks for the advice, I'll try to manage this without plyer
Reply all
Reply to author
Forward
0 new messages