-
Notifications
You must be signed in to change notification settings - Fork 19
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
[HapticFeedback] Implement vibrate() #75
[HapticFeedback] Implement vibrate() #75
Conversation
e818004
to
5bfc5c8
Compare
[Before] HapticFeedback.vibrate() was not implemented [After] The code below will cause a short vibration: HapticFeedback.vibrate() Signed-off-by: Pawel Wasowski <[email protected]>
HapticFeedback.vibrate will only work on mobile and wearable profiles so its dependencies should only be included in builds for these devices. Signed-off-by: Pawel Wasowski <[email protected]>
5bfc5c8
to
b86b01c
Compare
As this is my first change in
|
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.
I've put
FeedbackManager
class implementation inplatform_channel.cc
. Honestly, I consider it to be a little bit of a code smell,
I personally don't mind this.
Do you think, I can put them (i.e.
feedback_manager.h
andfeedback_manager.cc
) directly insrc/flutter/shell/platform/tizen/channels
?
Yes, you can. You can also refer to other platform implementations and find the best way you think.
From what I've seen, Flutter has no strict rules regarding formulation of error messages. I've tried to make my messages meaningful - have I got it right?
Printing meaningful error messages is always a good thing and I think you're doing right. You should use FT_LOGE rather than FT_LOGD to print your error to the tool's log console. The flutter-tizen tool only prints log messages with the log level INFO or above. There's no other rule for formatting log messages AFAIK.
- use the proper "MOBILE_PROFILE" and "WEARABLE_PROFILE" names instead of "MOBILE" and "WEARABLE" - reorder lines in BUILD.gn Signed-off-by: Pawel Wasowski <[email protected]>
Signed-off-by: Pawel Wasowski <[email protected]>
Signed-off-by: Pawel Wasowski <[email protected]>
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.
LGTM
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.
LGTM
* [HapticFeedback] Implement vibrate() [Before] HapticFeedback.vibrate() was not implemented [After] The code below will cause a short vibration: HapticFeedback.vibrate() Signed-off-by: Pawel Wasowski <[email protected]> * Make HapticFeedback.vibrate's dependencies dependent on profile HapticFeedback.vibrate will only work on mobile and wearable profiles so its dependencies should only be included in builds for these devices. Signed-off-by: Pawel Wasowski <[email protected]> * Make FeedbackManager a singleton * [HapticFeedback.vibrate] Minfor fixes - use the proper "MOBILE_PROFILE" and "WEARABLE_PROFILE" names instead of "MOBILE" and "WEARABLE" - reorder lines in BUILD.gn Signed-off-by: Pawel Wasowski <[email protected]> * Refactor implementation of HapticFeedback.vibrate() and BUILD.gn Signed-off-by: Pawel Wasowski <[email protected]> * [HapticFeedback] Refactor FeedbackManager Signed-off-by: Pawel Wasowski <[email protected]> * [HapticFeedback] Use FT_LOGE for all error logs
* [HapticFeedback] Implement vibrate() [Before] HapticFeedback.vibrate() was not implemented [After] The code below will cause a short vibration: HapticFeedback.vibrate() Signed-off-by: Pawel Wasowski <[email protected]> * Make HapticFeedback.vibrate's dependencies dependent on profile HapticFeedback.vibrate will only work on mobile and wearable profiles so its dependencies should only be included in builds for these devices. Signed-off-by: Pawel Wasowski <[email protected]> * Make FeedbackManager a singleton * [HapticFeedback.vibrate] Minfor fixes - use the proper "MOBILE_PROFILE" and "WEARABLE_PROFILE" names instead of "MOBILE" and "WEARABLE" - reorder lines in BUILD.gn Signed-off-by: Pawel Wasowski <[email protected]> * Refactor implementation of HapticFeedback.vibrate() and BUILD.gn Signed-off-by: Pawel Wasowski <[email protected]> * [HapticFeedback] Refactor FeedbackManager Signed-off-by: Pawel Wasowski <[email protected]> * [HapticFeedback] Use FT_LOGE for all error logs
* [HapticFeedback] Implement vibrate() [Before] HapticFeedback.vibrate() was not implemented [After] The code below will cause a short vibration: HapticFeedback.vibrate() Signed-off-by: Pawel Wasowski <[email protected]> * Make HapticFeedback.vibrate's dependencies dependent on profile HapticFeedback.vibrate will only work on mobile and wearable profiles so its dependencies should only be included in builds for these devices. Signed-off-by: Pawel Wasowski <[email protected]> * Make FeedbackManager a singleton * [HapticFeedback.vibrate] Minfor fixes - use the proper "MOBILE_PROFILE" and "WEARABLE_PROFILE" names instead of "MOBILE" and "WEARABLE" - reorder lines in BUILD.gn Signed-off-by: Pawel Wasowski <[email protected]> * Refactor implementation of HapticFeedback.vibrate() and BUILD.gn Signed-off-by: Pawel Wasowski <[email protected]> * [HapticFeedback] Refactor FeedbackManager Signed-off-by: Pawel Wasowski <[email protected]> * [HapticFeedback] Use FT_LOGE for all error logs
* [HapticFeedback] Implement vibrate() [Before] HapticFeedback.vibrate() was not implemented [After] The code below will cause a short vibration: HapticFeedback.vibrate() Signed-off-by: Pawel Wasowski <[email protected]> * Make HapticFeedback.vibrate's dependencies dependent on profile HapticFeedback.vibrate will only work on mobile and wearable profiles so its dependencies should only be included in builds for these devices. Signed-off-by: Pawel Wasowski <[email protected]> * Make FeedbackManager a singleton * [HapticFeedback.vibrate] Minfor fixes - use the proper "MOBILE_PROFILE" and "WEARABLE_PROFILE" names instead of "MOBILE" and "WEARABLE" - reorder lines in BUILD.gn Signed-off-by: Pawel Wasowski <[email protected]> * Refactor implementation of HapticFeedback.vibrate() and BUILD.gn Signed-off-by: Pawel Wasowski <[email protected]> * [HapticFeedback] Refactor FeedbackManager Signed-off-by: Pawel Wasowski <[email protected]> * [HapticFeedback] Use FT_LOGE for all error logs
* [HapticFeedback] Implement vibrate() [Before] HapticFeedback.vibrate() was not implemented [After] The code below will cause a short vibration: HapticFeedback.vibrate() * Make HapticFeedback.vibrate's dependencies dependent on profile HapticFeedback.vibrate will only work on mobile and wearable profiles so its dependencies should only be included in builds for these devices. * Make FeedbackManager a singleton * [HapticFeedback.vibrate] Minfor fixes - use the proper "MOBILE_PROFILE" and "WEARABLE_PROFILE" names instead of "MOBILE" and "WEARABLE" - reorder lines in BUILD.gn * Refactor implementation of HapticFeedback.vibrate() and BUILD.gn * [HapticFeedback] Refactor FeedbackManager * [HapticFeedback] Use FT_LOGE for all error logs Signed-off-by: Pawel Wasowski <[email protected]>
* [HapticFeedback] Implement vibrate() [Before] HapticFeedback.vibrate() was not implemented [After] The code below will cause a short vibration: HapticFeedback.vibrate() * Make HapticFeedback.vibrate's dependencies dependent on profile HapticFeedback.vibrate will only work on mobile and wearable profiles so its dependencies should only be included in builds for these devices. * Make FeedbackManager a singleton * [HapticFeedback.vibrate] Minfor fixes - use the proper "MOBILE_PROFILE" and "WEARABLE_PROFILE" names instead of "MOBILE" and "WEARABLE" - reorder lines in BUILD.gn * Refactor implementation of HapticFeedback.vibrate() and BUILD.gn * [HapticFeedback] Refactor FeedbackManager * [HapticFeedback] Use FT_LOGE for all error logs Signed-off-by: Pawel Wasowski <[email protected]>
* [HapticFeedback] Implement vibrate() [Before] HapticFeedback.vibrate() was not implemented [After] The code below will cause a short vibration: HapticFeedback.vibrate() * Make HapticFeedback.vibrate's dependencies dependent on profile HapticFeedback.vibrate will only work on mobile and wearable profiles so its dependencies should only be included in builds for these devices. * Make FeedbackManager a singleton * [HapticFeedback.vibrate] Minfor fixes - use the proper "MOBILE_PROFILE" and "WEARABLE_PROFILE" names instead of "MOBILE" and "WEARABLE" - reorder lines in BUILD.gn * Refactor implementation of HapticFeedback.vibrate() and BUILD.gn * [HapticFeedback] Refactor FeedbackManager * [HapticFeedback] Use FT_LOGE for all error logs Signed-off-by: Pawel Wasowski <[email protected]>
* [HapticFeedback] Implement vibrate() [Before] HapticFeedback.vibrate() was not implemented [After] The code below will cause a short vibration: HapticFeedback.vibrate() * Make HapticFeedback.vibrate's dependencies dependent on profile HapticFeedback.vibrate will only work on mobile and wearable profiles so its dependencies should only be included in builds for these devices. * Make FeedbackManager a singleton * [HapticFeedback.vibrate] Minfor fixes - use the proper "MOBILE_PROFILE" and "WEARABLE_PROFILE" names instead of "MOBILE" and "WEARABLE" - reorder lines in BUILD.gn * Refactor implementation of HapticFeedback.vibrate() and BUILD.gn * [HapticFeedback] Refactor FeedbackManager * [HapticFeedback] Use FT_LOGE for all error logs Signed-off-by: Pawel Wasowski <[email protected]>
* [HapticFeedback] Implement vibrate() [Before] HapticFeedback.vibrate() was not implemented [After] The code below will cause a short vibration: HapticFeedback.vibrate() * Make HapticFeedback.vibrate's dependencies dependent on profile HapticFeedback.vibrate will only work on mobile and wearable profiles so its dependencies should only be included in builds for these devices. * Make FeedbackManager a singleton * [HapticFeedback.vibrate] Minfor fixes - use the proper "MOBILE_PROFILE" and "WEARABLE_PROFILE" names instead of "MOBILE" and "WEARABLE" - reorder lines in BUILD.gn * Refactor implementation of HapticFeedback.vibrate() and BUILD.gn * [HapticFeedback] Refactor FeedbackManager * [HapticFeedback] Use FT_LOGE for all error logs Signed-off-by: Pawel Wasowski <[email protected]>
* [HapticFeedback] Implement vibrate() [Before] HapticFeedback.vibrate() was not implemented [After] The code below will cause a short vibration: HapticFeedback.vibrate() * Make HapticFeedback.vibrate's dependencies dependent on profile HapticFeedback.vibrate will only work on mobile and wearable profiles so its dependencies should only be included in builds for these devices. * Make FeedbackManager a singleton * [HapticFeedback.vibrate] Minfor fixes - use the proper "MOBILE_PROFILE" and "WEARABLE_PROFILE" names instead of "MOBILE" and "WEARABLE" - reorder lines in BUILD.gn * Refactor implementation of HapticFeedback.vibrate() and BUILD.gn * [HapticFeedback] Refactor FeedbackManager * [HapticFeedback] Use FT_LOGE for all error logs Signed-off-by: Pawel Wasowski <[email protected]>
[Before] HapticFeedback.vibrate() was not implemented
[After] The code below will cause a short vibration:
Signed-off-by: Pawel Wasowski [email protected]
HapticFeedback.vibrate() was one of the features to implement on this list #53 (comment)
Before building with this change, be sure to use tizen_tools with this commit applied: https://github.com/flutter-tizen/tizen_tools/pull/10
The change will only work on devices that support it. I have tested it on a Samsung Z3 (aka TM1) smartphone with Tizen 6.5.