Jetpack Compose Support
Closed this issue · 13 comments
Hello clarity team,
We want to use Clarity in our Android application, but our application has pages written with Jetpack Compose and cannot work with Clarity in harmony with these pages.
When will Jetpack compose support come?
Even I put *Screen exclusion for masking, it doesn't support.
++
We've just released our first compose package (clarity-compose) :) Please give it a shot and let us know your feedback.
Is there a need for an extra implementation?
Is it enough if we just update the current implementation to the latest version? @ibradwan
All what you have to do is to switch to the "clarity-compose" package and you should start seeing compose views in playback. The docs will be updates soon to include more details.
@ibradwan Hey i am using the package "com.microsoft.clarity:clarity-compose:2.5.0" but still compose views are not shown in dashboard
Hello @nikhilbiju67, which version of Jetpack Compose are you using?
I am using implementation(platform("androidx.compose:compose-bom:2024.06.00"))
@SaadeldinBadr
@nikhilbiju67 Could you please set log level in Clarity config to LogLevel.Verbose
and share the logs with tag:Clarity
here for a brief session? Also provide me with your app's package name if possible.
Hello there,
I just started playing with Microsoft Clarity. I have integrated Clarity into my project, which is mostly Jetpack Compose with few legacy view based screens. Clarity version: com.microsoft.clarity:clarity-compose:2.5.1
Non-composable activities appears to be captured correctly, but all composable screens are blank. Here's an exception that I get:
[SourceFile::a] Exception in captureAndroidComposeView: java.lang.NullPointerException
2024-09-30 10:38:53.102 1185-1185 Clarity aaa.bbb.cccc.ddddddddddd E [SourceFile::a] null
2024-09-30 10:38:53.102 1185-1185 Clarity aaa.bbb.cccc.ddddddddddd E [SourceFile::a] java.lang.NullPointerException (Ask Gemini)
at com.microsoft.clarity.e.b.a(Unknown Source:32)
at com.microsoft.clarity.e.b.a(SourceFile:6)
at com.microsoft.clarity.e.d.a(SourceFile:84)
at com.microsoft.clarity.e.d.a(SourceFile:84)
at com.microsoft.clarity.e.d.a(SourceFile:84)
at com.microsoft.clarity.e.d.a(SourceFile:84)
at com.microsoft.clarity.e.d.a(SourceFile:84)
at com.microsoft.clarity.e.d$d.invoke(SourceFile:3)
at com.microsoft.clarity.e.d.a(SourceFile:20)
at com.microsoft.clarity.f.j.invoke(SourceFile:3)
at com.microsoft.clarity.n.k.a(Unknown Source:22)
at com.microsoft.clarity.f.k$a.invoke(SourceFile:12)
at com.microsoft.clarity.n.d.a(Unknown Source:5)
at com.microsoft.clarity.n.c.invoke(SourceFile:1)
at com.microsoft.clarity.n.k.a(Unknown Source:22)
at com.microsoft.clarity.n.d.a(SourceFile:5)
at com.microsoft.clarity.f.k.run(SourceFile:2)
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:230)
at android.os.Looper.loop(Looper.java:319)
at android.app.ActivityThread.main(ActivityThread.java:9063)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:588)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
compile sdk: 34
target sdk: 34
device running Android 14
Thank you for your help.
Hello @Wysel ,
which version of Jetpack Compose are you using?
1.7.2
@Wysel, this version is not supported yet. Currently clarity-compose:2.5.x
supports jetpack compose stable releases from 1.0.0
to 1.6.8
.
Thanks @SaadeldinBadr, I was afraid that that's what's happening :) When do you expect to provide support for 1.7.2?