Skip to content

Conversation

@MihaiCristianCondrea
Copy link
Owner

Summary

  • document recommended Android architecture practices for Java-based projects
  • link to architecture guidance in README

Testing

  • ./gradlew test (fails: SDK location not found)

https://chatgpt.com/codex/tasks/task_e_68c1b5ec66fc832d9e4115cdf84b2220

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

Codex Review: Here are some suggestions.

Reply with @codex fix comments to fix any unresolved comments.

About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".

Comment on lines +128 to +132
| Recommendation | Description |
| --- | --- |
| **Do not override lifecycle methods in Activities or Fragments.**<br/>Strongly recommended | Do not override lifecycle methods such as `onResume` in Activities or Fragments. Use `LifecycleObserver` instead. If the app needs to perform work when the lifecycle reaches a certain state, use the `repeatOnLifecycle` API. |

The following snippet outlines how to perform operations given a certain lifecycle state:

Choose a reason for hiding this comment

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

[P1] Revisit prohibition on overriding lifecycle callbacks

The lifecycle section states that Activities or Fragments should not override lifecycle methods and should always use LifecycleObserver instead. That guidance is incorrect for normal Android development where onCreate, onStart, onResume, etc. are routinely overridden to set up views, register receivers, or inflate Compose content. Treating overrides as “strongly recommended” to avoid will mislead readers into thinking core APIs are off-limits and block basic app initialization. This recommendation should be softened or scoped to specific side‑effect handling rather than forbidding lifecycle overrides outright.

Useful? React with 👍 / 👎.

@MihaiCristianCondrea MihaiCristianCondrea merged commit 6fc315f into main Sep 10, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants