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

Added Vibrator facade and android implementation #6

Merged
merged 5 commits into from
Mar 16, 2014

Conversation

inclement
Copy link
Member

No description provided.


def exists(self):
'''Check if the device has a vibrator. Returns True or False.'''
return self._exists()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On platforms without a vibrator, this returns NotImplementedError when it should return False. This makes the example app crash on those platforms, instead of failing gracefully.

@inclement
Copy link
Member Author

I don't feel very strongly about this, but I think the current way is consistent with the rest of plyer - actually I think it's in general maybe a bit annoying that a user has to potentially handle NotImplementedError.

I think a consistent solution would be to simply implement the desktop facades, and have them return False from everything. That way NotImplemented really does mean not implemented, but the desktop still has the right behaviour...would that suit you?

inclement added a commit that referenced this pull request Mar 16, 2014
Added Vibrator facade and android implementation
@inclement inclement merged commit ea7b220 into kivy:master Mar 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants