Skip to content
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

vibrator on android 10 java.lang.SecurityException #606

Closed
skorpions2000 opened this issue Mar 13, 2021 · 2 comments
Closed

vibrator on android 10 java.lang.SecurityException #606

skorpions2000 opened this issue Mar 13, 2021 · 2 comments
Labels

Comments

@skorpions2000
Copy link

I tested:

from plyer import vibrator
        try:
            print(vibrator.exists())
            vibrator.vibrate(1)
        except Exception as ex:
            print(ex)

in return on log my phone I have:

 I python  : True
 I python  : JVM exception occurred: Requires VIBRATE permission java.lang.SecurityException

Sorry,
Where is my mistake?

@tshirtman
Copy link
Member

https://python-for-android.readthedocs.io/en/latest/apis/#runtime-permissions

@skorpions2000
Copy link
Author

I'm write in buildozer.spec

# (list) Permissions
android.permissions = VIBRATE

It's working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants