-
Notifications
You must be signed in to change notification settings - Fork 431
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
Notification for android not working [ Drawable.icon ] #647
Comments
After days of researching, coding and debugging, I have finally figured out the The logs returns an AttributeError which says: It turns out that the class So in plyer/platforms/android/notification.py, in line 100 I made this changes: from:
change to:
Then it works! Ps. This is not a resoultion as stated by @lydiym, just a workaround to make the app works. |
Hello! Issue is still actual. Build sources patching isn't good resolution. It should be fixed in plyer sources. |
Hello, you are right. I reopened the issue and edited my last comment. Thanks :) |
|
hey i am having problems on this, i am on windows |
What problem @MiiKyyz |
The problem on trying to push a notification on my Android. I have tried everything but nothing works
Get Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: masterjoseph914 ***@***.***>
Sent: Saturday, November 20, 2021 9:39:02 PM
To: kivy/plyer ***@***.***>
Cc: MiiKyyz ***@***.***>; Mention ***@***.***>
Subject: Re: [kivy/plyer] Notification for android not working [ Drawable.icon ] (#647)
What problem @MiiKyyz<https://github.com/MiiKyyz>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#647 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AU56MYVZMSGR5CJFARZQ7T3UNBLUNANCNFSM5ENYY3ZQ>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
How do you install plyer? What OS are you using? Plyer latest release (Release v2.0.0) was on last Nov 2020, the merged commits since then are not yet included when you install plyer using
Also, if you are using
Hope this helps. |
Hey thanks for answering back
I installed plyer by tying pip install plyer I believed, don't remember exactly
My OS phone is an Android that I am using.
Get Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: masterjoseph914 ***@***.***>
Sent: Friday, November 26, 2021 7:07:47 AM
To: kivy/plyer ***@***.***>
Cc: MiiKyyz ***@***.***>; Mention ***@***.***>
Subject: Re: [kivy/plyer] Notification for android not working [ Drawable.icon ] (#647)
The problem on trying to push a notification on my Android. I have tried everything but nothing works
How do you install plyer? What OS are you using?
Plyer latest release (Release v2.0.0) was on last Nov 2020, the merged commits since then are not yet included when you install plyer using pip install plyer. The workaround is to reinstall it using the latest master branch in this repo. To do that you need to run:
pip install https://github.com/kivy/plyer/archive/refs/heads/master.zip
Also, if you are using buildozer to build to apk, you need to specify the same link on your requirements instead of using plyer.
requirements = python,kivy,https://github.com/kivy/plyer/archive/refs/heads/master.zip
Hope this helps.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#647 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AU56MYR5RYDKZQSPCYFBZEDUN52BHANCNFSM5ENYY3ZQ>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Hello, I am trying to use mysql but, my app is crashing
I wrote this in the buildozer
requirements = python3,kivy==2.0.0,mysql_connector
android.permissions = INTERNET
but I am not sure what else I need to specify?
Hope an answer back please?
Get Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: masterjoseph914 ***@***.***>
Sent: Friday, November 26, 2021 7:07:47 AM
To: kivy/plyer ***@***.***>
Cc: MiiKyyz ***@***.***>; Mention ***@***.***>
Subject: Re: [kivy/plyer] Notification for android not working [ Drawable.icon ] (#647)
The problem on trying to push a notification on my Android. I have tried everything but nothing works
How do you install plyer? What OS are you using?
Plyer latest release (Release v2.0.0) was on last Nov 2020, the merged commits since then are not yet included when you install plyer using pip install plyer. The workaround is to reinstall it using the latest master branch in this repo. To do that you need to run:
pip install https://github.com/kivy/plyer/archive/refs/heads/master.zip
Also, if you are using buildozer to build to apk, you need to specify the same link on your requirements instead of using plyer.
requirements = python,kivy,https://github.com/kivy/plyer/archive/refs/heads/master.zip
Hope this helps.
-
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#647 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AU56MYR5RYDKZQSPCYFBZEDUN52BHANCNFSM5ENYY3ZQ>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Hi have you find solution with this? I think you need to use If that doesn't work, you should find solution on mysql docs or ask on mysql repo issues. |
12-18 16:59:22.522 23511 7720 I python : ConnectionRefusedError: [Errno 111] Connection refused
12-18 16:59:22.522 23511 7720 I python :
12-18 16:59:22.522 23511 7720 I python : During handling of the above exception, another exception occurred:
12-18 16:59:22.522 23511 7720 I python :
12-18 16:59:22.523 23511 7720 I python : Traceback (most recent call last):
12-18 16:59:22.523 23511 7720 I python : File "/content/.buildozer/android/app/main.py<http://main.py>", line 168, in <module>
12-18 16:59:22.524 23511 7720 I python : File "/content/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/awenwa/kivy/app.py<http://app.py>", line 949, in run
12-18 16:59:22.525 23511 7720 I python : File "/content/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/awenwa/kivy/app.py<http://app.py>", line 944, in _run_prepare
12-18 16:59:22.525 23511 7720 I python : File "kivy/_event.pyx", line 709, in kivy._event.EventDispatcher.dispatch
12-18 16:59:22.525 23511 7720 I python : File "/content/.buildozer/android/app/main.py<http://main.py>", line 124, in on_start
12-18 16:59:22.525 23511 7720 I python : File "/content/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/awenwa/mysql/connector/__init__.py", line 273, in connect
12-18 16:59:22.526 23511 7720 I python : File "/content/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/awenwa/mysql/connector/connection.py<http://connection.py>", line 114, in __init__
12-18 16:59:22.526 23511 7720 I python : File "/content/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/awenwa/mysql/connector/abstracts.py<http://abstracts.py>", line 1014, in connect
12-18 16:59:22.526 23511 7720 I python : File "/content/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/awenwa/mysql/connector/connection.py<http://connection.py>", line 426, in _open_connection
12-18 16:59:22.526 23511 7720 I python : File "/content/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/awenwa/mysql/connector/network.py<http://network.py>", line 576, in open_connection
12-18 16:59:22.526 23511 7720 I python : mysql.connector.errors.InterfaceError: 2003: Can't connect to MySQL server on '127.0.0.1:3306<http://127.0.0.1:3306>' (111 Connection refused)
12-18 16:59:22.527 23511 7720 I python : Python for android ended.
This is the error I have been receiving
My phone can't connect to the server on MySQL for some reason
Get Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: masterjoseph914 ***@***.***>
Sent: Tuesday, December 28, 2021 3:09:27 AM
To: kivy/plyer ***@***.***>
Cc: MiiKyyz ***@***.***>; Mention ***@***.***>
Subject: Re: [kivy/plyer] Notification for android not working [ Drawable.icon ] (#647)
python3,kivy==2.0.0,mysql_connector
Hi have you find solution with this?
I think you need to use mysql-connector or mysql-connector-python.
If that doesn't work, you should find solution on mysql docs or ask on mysql repo issues.
—
Reply to this email directly, view it on GitHub<#647 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AU56MYSCVGQHQZPPH34HBDTUTFWDPANCNFSM5ENYY3ZQ>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
You seem to use localhost. I don't have whole idea about your project but I don't think that will work. Try using public ip. You can take help of google cloud platform |
Hope this solution to send Android notifications using Plyer can be helpful to someone: |
I'm building an android app in buildozer with plyer. It seems that the notification don't work.
My simple code for notification using plyer:
It works on my computer but when I built it for android and run it on my phone, the app crashes when it tries to send a notification. It says that there's no attribute
icon
for the app in_set_icons.py
. I tried to look into it, but I don't know what should I do.buildozer.spec
logs
09-21 15:40:00.332 18207 18233 I python : File "/home/masterjoseph/notif-test/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/notificationtest/plyer/platforms/android/notification.py", line 100, in _set_icons
09-21 15:40:00.332 18207 18233 I python : AttributeError: type object 'com.test.notification.R$drawable' has no attribute 'icon'
09-21 15:40:00.332 18207 18233 I python : Python for android ended.
The text was updated successfully, but these errors were encountered: