Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
this issue may be related to #501 but is not exactly the same.
from plyer import vibrator vibrator.vibrate()
Crash as follow:
I've tried with Pyjnius and had the same result. The API 26 deprecation should not affect the code here, I'm building with API 28 but running on AP 23 (Android 6).
This issue has also been reported by somebody else at https://groups.google.com/forum/#!topic/kivy-users/rT9P-mmv0RE and on the chat, but without any solution provided.
@akshayaurora I'm running P4A directly, and I'm using this config: https://repos.goffi.org/cagou/file/tip/.p4a (I have a debug shell allowing to test directly on Android in my app). I did test on Python 2 but my code is now ported to Python 3 and I haven't yet tried to rebuild the Android apk (but I doubt that Python version has anything to do with that anyway).
@akshayaurora I've now ported my apk to Python 3 and tested again:
>>> import plyer >>> plyer.__version__ '1.4.2' >>> from plyer import vibrator >>> vibrator.vibrate() Traceback (most recent call last): File "<console>", line 1, in <module> File "/home/goffi/.local/share/python-for-android/build/python-installs/cagou_dev_build/plyer/facades/vibrator.py", line 52, in vibrate File "/home/goffi/.local/share/python-for-android/build/python-installs/cagou_dev_build/plyer/platforms/android/vibrator.py", line 24, in _vibrate File "jnius/jnius_export_class.pxi", line 1034, in jnius.jnius.JavaMultipleMethod.__call__ jnius.jnius.JavaException: No methods matching your arguments, available: ['(ILjava/lang/String;JLandroid/media/AudioAttributes;)V', '(ILjava/lang/String;[JILandroid/media/AudioAttributes;)V']
So this is still failing.