Skip to content

MOBILE-39: support shake and flip#699

Merged
sergeysozinov merged 8 commits intomission/webview-inappfrom
feature/MOBILE-39
Mar 27, 2026
Merged

MOBILE-39: support shake and flip#699
sergeysozinov merged 8 commits intomission/webview-inappfrom
feature/MOBILE-39

Conversation

@sergeysozinov
Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds motion-gesture support (shake + flip) to WebView in-apps by introducing a sensor-backed MotionService, exposing new bridge actions to start/stop monitoring, and emitting motion events back to JS.

Changes:

  • Introduced MotionService to detect SHAKE and FLIP gestures (including flip position transitions).
  • Added WebView bridge actions: motion.start, motion.stop, and outbound motion.event.
  • Added unit tests for shake detection behavior and flip position resolution.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
sdk/src/main/java/cloud/mindbox/mobile_sdk/inapp/presentation/view/motion/MotionService.kt New service for sensor lifecycle + shake/flip detection and flip transition payloads.
sdk/src/main/java/cloud/mindbox/mobile_sdk/inapp/presentation/view/WebViewInappViewHolder.kt Wires motion start/stop from JS and emits motion.event to the WebView bridge.
sdk/src/main/java/cloud/mindbox/mobile_sdk/inapp/presentation/view/WebViewAction.kt Adds new bridge actions for motion control/events.
sdk/src/test/java/cloud/mindbox/mobile_sdk/inapp/presentation/view/MotionServiceBehaviorTest.kt Tests shake cooldown/accumulation and sensor lifecycle registration/unregistration.
sdk/src/test/java/cloud/mindbox/mobile_sdk/inapp/presentation/view/MotionServiceResolvePositionTest.kt Tests flip-position resolution and threshold hysteresis behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sergeysozinov sergeysozinov merged commit 7161112 into mission/webview-inapp Mar 27, 2026
4 checks passed
@sergeysozinov sergeysozinov deleted the feature/MOBILE-39 branch March 27, 2026 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants