Skip to content
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

(Questtion) Fragment + Compose Integration #4

Open
jpedretti-ciandt opened this issue Mar 19, 2024 · 1 comment
Open

(Questtion) Fragment + Compose Integration #4

jpedretti-ciandt opened this issue Mar 19, 2024 · 1 comment

Comments

@jpedretti-ciandt
Copy link

Hey!

My project is built around fragments and fragment navigation, all contained within a single main activity. We're also utilizing a ComposeView in the fragments, with all content housed within it. Is it possible to use this library to get the Frames, Time to First Render (TTFR), and Time to Interactive (TTI) metrics in this scenario?

thanks!

@smbduknow
Copy link
Collaborator

smbduknow commented Apr 24, 2024

Hey @jpedretti-ciandt,
Thanks for the question

For Measuring TTI & TTFR for Fragments you can try to leverage FragmentTtfrHelper in a way similar to ActivityTtfrHelper, but just registering it as a FragmentLifecycleCallbacks inside your main single activity.

Regarding Compose-support: it's in progress but not yet finalized, we will do our best to add it soon. However if in your app you mostly represent "screens" with Fragments and use Compose to build layouts inside these fragments, I assume FragmentTtfrHelper should do the job in your case.

Hope this helps a bit and please let me know that worked for you or there is any edge case that should be handled 🙏

UPD: I've also update readme accordingly, since this use-case wasn't mentioned in the documentation. Thanks for the feedback

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

No branches or pull requests

2 participants