基维& plyer通知错误

时间:2016-02-28 14:59:38

标签: python-2.7 notifications kivy

我正试图在kivy的Android应用程序中发出通知,如下所示:

from plyer import notification

notification.notify('test tiltle','scanning started')

但我每次都在logcat中收到此错误

chnhack/in/web_sqli/R$drawable'
I/python  (28327):  Exception in thread Thread-1:
I/python  (28327):  Traceback (most recent call last):
I/python  (28327):    File "/root/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/threading.py", line 552, in __bootstrap_inner
I/python  (28327):    File "/root/.buildozer/android/app/main.py", line 165, in run
I/python  (28327):    File "/root/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/site-packages/plyer/facades/notification.py", line 21, in notify
I/python  (28327):    File "/root/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/site-packages/plyer/facades/notification.py", line 26, in _notify
I/python  (28327):  NotImplementedError: No usable implementation found!
I/python  (28327):  
D/dalvikvm(28327): threadid=11: thread exiting, not yet detached (count=0)
D/dalvikvm(28327): threadid=11: thread exiting, not yet detached (count

如果有人帮助我会很棒

1 个答案:

答案 0 :(得分:1)

阅读此example和实际code以获取通知可以解决您的问题。 notify()期望传递kwargs:icon_androidtitlemessage

notification.notify(title: 'test tiltle',message: 'scanning started')

对于类似的问题,请使用更实时的问题,现在最好的是IRC

相关问题