-
Notifications
You must be signed in to change notification settings - Fork 91
feat: Add interview questions for Coroutines, Compose, and Launch Modes #31
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
base: main
Are you sure you want to change the base?
Conversation
WalkthroughA new Markdown document, android_advanced_questions.md, was added containing Android interview-style questions with concise answers on topics like Kotlin Flow, Jetpack Compose state and stability, Activity launch modes, coroutine scopes, Dagger/Hilt scopes, and an outline of an offline-first sync architecture with Paging. Changes
Sequence Diagram(s)Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
* **`@Singleton`:** This annotation scopes a dependency to the `ApplicationComponent`. An instance is created only once during the application's entire lifecycle. The same instance is provided every time it's requested anywhere in the app. This is suitable for objects that are expensive to create and are needed globally, like a Retrofit instance, Room database, or a user data repository. | ||
* **`@ActivityScoped`:** This scopes a dependency to the `ActivityComponent`. The instance is created once per `Activity` instance and is shared across all fragments within that activity. It's destroyed when the `Activity` is destroyed. This is useful for dependencies that need to hold state specific to a single activity flow but needs to be shared among its fragments. |
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.
Update scope target to SingletonComponent
.
@Singleton
has been scoped to SingletonComponent
ever since Hilt dropped ApplicationComponent
. Please update the wording so readers aren’t pointed to a component that no longer exists in current Hilt versions.
🤖 Prompt for AI Agents
In android_advanced_questions.md around lines 50 to 51, the text refers to the
deprecated ApplicationComponent for @Singleton; update the wording to reference
SingletonComponent instead: replace "scopes a dependency to the
ApplicationComponent" with "scopes a dependency to the SingletonComponent" and
adjust any nearby phrasing that implies ApplicationComponent so the description
correctly states that the instance is created once for the application's
lifecycle and is provided by Hilt's SingletonComponent.
Hi there!
This PR contributes a set of new Android interview questions as part of the Hacktoberfest initiative.
Additions
StateFlow
andSharedFlow
.remember
vs.rememberSaveable
in Jetpack Compose.This helps expand the repository's question bank with topics relevant to modern Android development.
Closes #28
Summary by CodeRabbit