Skip to content

Conversation

@YapWC
Copy link
Contributor

@YapWC YapWC commented Jan 9, 2026

Exposed the bundle_indentifier in cookiecutter and updated the AndroidManifest, replacing {{ cookiecutter.bundle }}.{{ cookiecutter.app_name }} with {{ cookiecutter.bundle_identifier }}. This removes the underscore/hyphen mismatch and prevents the FileProvider “couldn’t find meta-data” crash for apps whose IDs contain underscores.

The Android manifest template currently builds the FileProvider authority from bundle + app_name, e.g. com.example.image_classification.fileprovider (with an underscore). At runtime, Toga’s Android camera code looks for the FileProvider using the hyphenated authority (com.example.image-classification.fileprovider), but the manifest has registered a different authority with an underscore.

By switching the manifest to use {{ cookiecutter.bundle_identifier }}. The authority in AndroidManifest.xml becomes com.example.image-classification.fileprovider, which matches exactly what Toga expects at runtime.

Fixes beeware/toga#3237

PR Checklist:

  • All new features have been tested
  • All new features have been documented
  • I have read the CONTRIBUTING.md file
  • I will abide by the code of conduct

Copy link
Member

@freakboy3742 freakboy3742 left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

@freakboy3742 freakboy3742 merged commit 8d40e37 into beeware:main Jan 11, 2026
16 checks passed
@YapWC YapWC deleted the fix-fileprovider-name branch January 12, 2026 05:00
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.

Android FileProvider name mixes up underscore and hyphen

2 participants