Compatibility
- Programming languages: The Android SDK supports and tracks content on any screen developed in Java or Kotlin.
- Android version: we support Android SDK API Level 21 (Android 5.0 - Lollipop) and later
- Android SDK version: The library is built and compiled against Android SDK version 34 (
compileSdk = 34
).
Java versions
Section titled Java versionsThis version has been compiled on Java 17
(Bytecode version 61).
Kotlin versions
Section titled Kotlin versionsContentsquare Android SDK is compiled with Kotlin version 1.8.22
.
If you don’t use the 1.8.22
Kotlin version and you have conflict issues; you must exclude the Kotlin stdlib
from our SDK.
Jetpack Compose versions
Section titled Jetpack Compose versionsContentsquare Compose SDK com.contentsquare.android:compose:4.31.0
is compiled using Jetpack Compose version 1.5.4
(bom 2023.10.01
).
CS Compose version | Embedded Compose version | Minimum Compose version | Latest tested Compose version |
---|---|---|---|
4.31.0 | 1.5.4 | 1.5.0 | 1.7.0-beta06 |
4.30.0 | 1.5.4 | 1.5.0 | |
4.29.1 | 1.5.4 | 1.5.0 | |
4.28.0 | 1.5.4 | 1.5.0 | |
4.27.1 | 1.5.4 | 1.4.0 | |
4.26.0 | 1.5.4 | 1.4.0 | |
4.25.0 | 1.5.4 | 1.4.0 | |
4.24.1 | 1.5.4 | 1.4.0 | |
4.23.1 | 1.4.0 | 1.4.0 | |
4.22.0 | 1.4.0 | 1.4.0 | |
4.21.0 | 1.4.0 | 1.4.0 | |
4.20.0 | 1.4.0 | 1.4.0 |
Force a specific Compose version
Section titled Force a specific Compose versionIf you want to force the Compose version to match the one in your project, you have to use strictly ↗ Gradle mechanism for the 2 Compose dependencies we use in the CS Compose library: androidx.compose.ui:ui
and androidx.compose.runtime:runtime
.
Example of forcing Compose 1.5.0:
Dependencies
Section titled DependenciesThe Contentsquare SDK has a few dependencies. We try to be up-to-date as much as possible to avoid conflict issue.
Handling conflicts
Section titled Handling conflictsWe may sometimes have conflicts between your app dependencies VS SDK dependencies. In this case, you can exclude from our SDK any dependency we pull and use your version instead.
Example with excluding recyclerview
dependency
Section titled Example with excluding recyclerview dependencyIf you have a version of the recyclerview
in your app which is older than the one we use, you can use the following to exclude it in your Gradle file.
By doing this, you skip the recyclerview
and swiperefreshlayout
dependencies provided by our SDK.
Dependencies list
Section titled Dependencies listThe list of dependencies for each artifact is searchable on mvnrepository.com:
Known limitations and recommendations
Section titled Known limitations and recommendationsNative UI Elements are not supported
Section titled Native UI Elements are not supportedSymptom:
- You capture snapshots but main elements of the screen are not appearing.
- SDK does not log any gesture events when interacting with some native UI elements.
Explanation: Native UI Elements such as Bottom Sheets, Dialogs, Menus are currently not supported by the SDK.
Gestures not attached to the expected view (Layout visibility)
Section titled Gestures not attached to the expected view (Layout visibility)Symptom: In some cases, we found that gestures tracked by the SDK are not attached to the right UI element of the screen. These gestures will be attached to an invisible view.
Explanation: The reason to this is that when the SDK attaches the gesture to a UI element, it generates a path regarding the visibility of the view when traversing the view hierarchy. If a view is visible and it matches the coordinates on where the gesture was performed it will be taken into account. Most of the time, the issue is that a layout is still present in the screen even if there is no content.
Best Practice: When designing your application UI, do not let any layout stray along if is not used. If a layout that contains widgets like progress bar, remember to set its visibility to GONE
or INVISIBLE
after its purpose is served.