11-09 19:57:51.778 1921 1950 I autologin: Traceback (most recent call last):
11-09 19:57:51.778 1921 1950 I autologin: File "/Users/aaa/PycharmProjects/test1_kivymd/.buildozer/android/app/service/main.py", line 120, in <module>
11-09 19:57:51.778 1921 1950 I autologin: File "/Users/aaa/PycharmProjects/test1_kivymd/.buildozer/android/app/service/main.py", line 49, in do_notify
11-09 19:57:51.778 1921 1950 I autologin: File "...notification.py", line 75, in __init__
11-09 19:57:51.778 1921 1950 I autologin: AttributeError: 'org.kivy.android.PythonService' object has no attribute 'getComponentName'
11-09 19:57:51.778 1921 1950 I python : Python for android ended.
maybe,Modify function
class AndroidNotification():
def __init__(self):
package_name = activity.getPackageName()
self._ns = None
self._channel_id = package_name
pm = activity.getPackageManager()
if getattr(activity, 'getComponentName', None) is None:
info = pm.getApplicationInfo(package_name, 0)
else:
info = pm.getActivityInfo(activity.getComponentName(), 0)
if info.icon == 0:
# Take the application icon instead.
info = pm.getApplicationInfo(package_name, 0)
self._app_icon = info.icon
in service,call notification.notify(),AttributeError: 'org.kivy.android.PythonService' object has no attribute 'getComponentName'
code
logcat
maybe,Modify function class AndroidNotification():