Android: don't hardcode the package name #829

Open
aoleg94 wants to merge 1 commit from aoleg94/android-package-agnostic into main
aoleg94 commented 2026-10-03 17:41:55 -05:00 (Migrated from github.com)

Summary

Building the app under another applicationId, e.g. applicationIdSuffix ".debug" to install a
test build next to a release one, crashes on launch, and sharing logs or exported settings would
fail:

  • the FileProvider authority was the fixed string com.metallic.chiaki.fileprovider in both
    the manifest and Kotlin; it is now ${applicationId}.fileprovider / "$packageName.fileprovider";
  • activity_main.xml named two CoordinatorLayout behaviours relative to the package
    (.main.FloatingActionButton…Behavior), which resolves against the application id; they are
    now fully qualified.

No change for the current package name.

Testing

Built with applicationIdSuffix ".dev": launches (crashed before), merged manifest has
com.metallic.chiaki.dev.fileprovider. ./gradlew testDebugUnitTest passes.

Notes

Developed with the assistance of Claude Code, and tested on real hardware as described above.

🤖 Generated with Claude Code

### Summary Building the app under another `applicationId`, e.g. `applicationIdSuffix ".debug"` to install a test build next to a release one, crashes on launch, and sharing logs or exported settings would fail: - the `FileProvider` authority was the fixed string `com.metallic.chiaki.fileprovider` in both the manifest and Kotlin; it is now `${applicationId}.fileprovider` / `"$packageName.fileprovider"`; - `activity_main.xml` named two `CoordinatorLayout` behaviours relative to the package (`.main.FloatingActionButton…Behavior`), which resolves against the application id; they are now fully qualified. No change for the current package name. ### Testing Built with `applicationIdSuffix ".dev"`: launches (crashed before), merged manifest has `com.metallic.chiaki.dev.fileprovider`. `./gradlew testDebugUnitTest` passes. ### Notes Developed with the assistance of Claude Code, and tested on real hardware as described above. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This pull request is broken due to missing fork information.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'aoleg94/android-package-agnostic:aoleg94/android-package-agnostic'
git switch 'aoleg94/android-package-agnostic'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'aoleg94/android-package-agnostic'
git switch 'aoleg94/android-package-agnostic'
git rebase 'main'
git switch 'main'
git merge --ff-only 'aoleg94/android-package-agnostic'
git switch 'aoleg94/android-package-agnostic'
git rebase 'main'
git switch 'main'
git merge --no-ff 'aoleg94/android-package-agnostic'
git switch 'main'
git merge --squash 'aoleg94/android-package-agnostic'
git switch 'main'
git merge --ff-only 'aoleg94/android-package-agnostic'
git switch 'main'
git merge 'aoleg94/android-package-agnostic'
git push origin 'main'
Sign in to join this conversation.
No description provided.