Skip to content

Conversation

shreeharshshinde
Copy link

@shreeharshshinde shreeharshshinde commented Oct 2, 2025

Hi there!

This PR contributes a set of new Android interview questions as part of the Hacktoberfest initiative.

Additions

  • A question comparing StateFlow and SharedFlow.
  • A question explaining the use cases for remember vs. rememberSaveable in Jetpack Compose.
  • A question detailing the different Activity launch modes.

This helps expand the repository's question bank with topics relevant to modern Android development.

Closes #28

Summary by CodeRabbit

  • Documentation
    • Added an advanced Android Q&A guide covering: Kotlin Flow (StateFlow vs SharedFlow), Jetpack Compose remember vs rememberSaveable, Activity launch modes, Compose stability annotations, coroutineScope vs supervisorScope exception handling, Dagger/Hilt scopes, and an offline-first data sync architecture (SSOT, Repository, Retrofit, WorkManager, conflict resolution, Paging 3). Provides concise explanations, practical notes, and structured sections for quick reference.

Copy link

coderabbitai bot commented Oct 2, 2025

Walkthrough

A 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

Cohort / File(s) Summary
Docs: Android interview Q&A
android_advanced_questions.md
Added a sectioned Q&A document covering Kotlin Flow (StateFlow/SharedFlow), Compose remember/rememberSaveable and stability annotations, Activity launch modes, coroutineScope vs supervisorScope, Dagger/Hilt scopes, and an offline-first architecture with SSOT, Repository, Retrofit, WorkManager, conflict resolution, and Paging 3 RemoteMediator.

Sequence Diagram(s)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

Thump-thump, I hop through bytes and lore,
New questions sprout—more carrots to store. 🥕
Compose and Flows in tidy rows,
Hilted burrows where DI grows.
Offline dreams sync moonlit light—
A rabbit’s notes for interview night.

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title succinctly summarizes the main addition of interview questions on Coroutines, Jetpack Compose, and Activity launch modes, matching the PR description and using a clear, concise convention.
Linked Issues Check ✅ Passed The pull request adds a Markdown file with new Android interview questions and answers following the prescribed format, covering topics such as StateFlow vs SharedFlow, remember vs rememberSaveable, and Activity launch modes, thereby fulfilling the objectives of issue #28 to contribute community-driven interview content.
Out of Scope Changes Check ✅ Passed All changes are confined to adding a single Markdown file with relevant interview questions as specified by the linked issue and do not introduce any unrelated code modifications or extraneous files.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d0a726a and 1c0a444.

📒 Files selected for processing (1)
  • android_advanced_questions.md (1 hunks)

Comment on lines +50 to +51
* **`@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.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

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.

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

Successfully merging this pull request may close these issues.

📌 Contribute Android Interview Questions & Answers
1 participant