-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
[RCTVibration] Basic Vibration API #154
Conversation
@@ -146,6 +146,11 @@ function setupGeolocation() { | |||
GLOBAL.navigator.geolocation = require('Geolocation'); | |||
} | |||
|
|||
function setupVibration() { | |||
GLOBAL.navigator = GLOBAL.navigator || {}; | |||
GLOBAL.navigator.vibrate = require('Vibration').vibrate; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since it doesn't comply with the specification and we're going to want something different for Android. Do you mind making a VibrationIOS module?
@vjeux Fixed up according to your comments. Not 100% sure if I got the docs in the right place so let me know if not. |
@@ -46,6 +46,7 @@ var EXAMPLES = [ | |||
require('./AdSupportIOSExample'), | |||
require('./AppStateExample'), | |||
require('./ActionSheetIOSExample'), | |||
require('./VibrationExample'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if I should now call this IOS or if it's ok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, call it IOS please. We're going to have a different one for Android with other options
* Exposed as navigator.vibrate(); * Include a UI Explorer example. * Vibration patterns are currently unsupported as there is no API to produce a vibration of less than 1 second on iOS.
Looks good to me, i'll pull in internally and wait for the tests to see :) |
👍 Great thanks for all the feedback. |
Okay, can I ask you a favor? Can you remove the changes in extractDocs.js. We're not mirroring those internally, so they make the patch to fail and the entire tool breaks :x We need to fix the tool but as a small workaround would be nice if you could help out :) Thanks |
No probs! Done. Think the previous Travis build failed randomly as the |
Yay, it passed and it's merged :) When I do the next update (this afternoon) it's going to go live. Thanks! |
VibrationIOS.vibrate();