-
Notifications
You must be signed in to change notification settings - Fork 11
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
feat: add scroll and swipe autocapture #201
Merged
PouriaAmini
merged 33 commits into
amplitude:main
from
PouriaAmini:AMP-100454_autocapture
Jun 13, 2024
Merged
feat: add scroll and swipe autocapture #201
PouriaAmini
merged 33 commits into
amplitude:main
from
PouriaAmini:AMP-100454_autocapture
Jun 13, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Conflicts: # android/src/main/java/com/amplitude/android/internal/gestures/AutocaptureGestureListener.kt # android/src/main/java/com/amplitude/android/utilities/DefaultEventUtils.kt # android/src/test/java/com/amplitude/android/internal/gestures/AutocaptureGestureListenerClickTest.kt
# Conflicts: # android/src/main/java/com/amplitude/android/internal/gestures/AutocaptureGestureListener.kt # android/src/main/java/com/amplitude/android/internal/locators/AndroidViewTargetLocator.kt
# Conflicts: # android/build.gradle # android/src/main/java/com/amplitude/android/DefaultTrackingOptions.kt # android/src/main/java/com/amplitude/android/internal/ViewHierarchyScanner.kt # android/src/main/java/com/amplitude/android/internal/ViewTarget.kt # android/src/main/java/com/amplitude/android/internal/gestures/AutocaptureGestureListener.kt # android/src/main/java/com/amplitude/android/internal/gestures/AutocaptureWindowCallback.kt # android/src/main/java/com/amplitude/android/internal/locators/AndroidViewTargetLocator.kt # android/src/main/java/com/amplitude/android/internal/locators/ComposeLayoutNodeBoundsHelper.java # android/src/main/java/com/amplitude/android/internal/locators/ComposeViewTargetLocator.java # android/src/main/java/com/amplitude/android/internal/locators/ViewTargetLocator.kt # android/src/main/java/com/amplitude/android/internal/locators/ViewTargetLocators.kt # android/src/main/java/com/amplitude/android/utilities/DefaultEventUtils.kt # android/src/test/java/com/amplitude/android/internal/gestures/AutocaptureGestureListenerClickTest.kt # android/src/test/java/com/amplitude/android/internal/gestures/AutocaptureWindowCallbackTest.kt
android/src/main/java/com/amplitude/android/internal/gestures/AutocaptureWindowCallback.kt
Show resolved
Hide resolved
android/src/main/java/com/amplitude/android/internal/locators/ComposeViewTargetLocator.java
Outdated
Show resolved
Hide resolved
justin-fiedler
approved these changes
Jun 13, 2024
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.
Thanks @PouriaAmini. LGTM. See nits.
android/src/main/java/com/amplitude/android/internal/gestures/AutocaptureGestureListener.kt
Outdated
Show resolved
Hide resolved
...src/test/java/com/amplitude/android/internal/gestures/AutocaptureGestureListenerClickTest.kt
Show resolved
Hide resolved
github-actions bot
pushed a commit
that referenced
this pull request
Aug 8, 2024
# [1.17.0](v1.16.8...v1.17.0) (2024-08-08) ### Bug Fixes * extract ComposeUtils to share with plugins ([#202](#202)) ([c239bba](c239bba)) * fix release pipeline ([#211](#211)) ([816599f](816599f)) * revert autocapture scroll and swipe ([#206](#206)) ([4b834bd](4b834bd)) ### Features * add autocapture for element clicks ([#199](#199)) ([7f0a500](7f0a500)) * add autocapture in configs ([#207](#207)) ([dcb9393](dcb9393)) * add screen name to elementInteractions properties for autocapture ([#209](#209)) ([8044122](8044122)) * add scroll and swipe autocapture ([#201](#201)) ([1a5a392](1a5a392))
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds support for scroll and swipe autocapture. The functionality is enabled by default when
userInteractions
is set totrue
inDefaultTrackingOptions
.New automatically captured event
[Amplitude] Element Scrolled
: Emitted when a user scrolls on a scrollable element in the legacy Android View system or a tagged scrollable@Composable
functions in Compose.[Amplitude] Element Swiped
: Emitted when a user flings on a UI element that was previously scrolled/moved.Note: To capture the event in Compose, the scrollable
@Composable
functions must include a Modifier.testTag, otherwise the event will not be captured. Scrollable@Composable
functions have an ScrollBy lambda or a Modifier.scrollable modifier (for Jetpack Compose > 1.5).New automatically captured properties
[Amplitude] Direction
: (Android Views and Compose) The direction of the scroll or swipe (Up
,Right
,Down
,Left
).Optimizations around Autocapture implementations
resourceEntryName
does not exist.Checklist