Skip to content

fix(crash) + feat(i18n): SafeCrashlytics wrapper + expand Arabic + seed Indonesian (Phase 2 start) - #3

Open
devin-ai-integration[bot] wants to merge 1 commit into
feat/phase1-quality-i18n-uxfrom
feat/phase2-edge-to-edge-i18n-modular
Open

devin-ai-integration[bot] wants to merge 1 commit into
feat/phase1-quality-i18n-uxfrom
feat/phase2-edge-to-edge-i18n-modular

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Apr 27, 2026 •

Copy link
Copy Markdown

Summary

Hotfix for the Phase 1 r1 launch crash plus the first Phase 2 batch of
i18n improvements.

Crash fix (the urgent part)

v7.0.0-phase1-r1 crashed on real devices the moment a project opened:

Unable to instantiate activity ComponentInfo{pro.sketchware/com.besome.sketch.design.DesignActivity}:
java.lang.IllegalStateException: Default FirebaseApp is not initialized in this process pro.sketchware.

DesignActivity, LogicEditorActivity, and ViewPane each held a
FirebaseCrashlytics instance in a private final field initialized via
FirebaseCrashlytics.getInstance(). Because Sketchware Pro is built without
google-services.json, the default FirebaseApp is never auto-initialized,
so getInstance() throws and the activity itself fails to instantiate.

Introduce pro.sketchware.utility.telemetry.SafeCrashlytics — a thin
null-safe wrapper that resolves the FirebaseCrashlytics delegate lazily
and silently no-ops every call when Firebase is unavailable. Same public
methods (log, recordException) so the call sites do not change. When a
FirebaseApp becomes available in the future, the wrapper starts delegating
to real Crashlytics again with no further code changes.

Phase 2 (i18n) starter batch

  • Arabic translation expanded from 88 → ~160 strings: settings, my-projects,
    manage-export-url, theme presets, search, common errors, drawer extras.
  • Indonesian (id) seed translation: app/src/main/res/values-id/strings.xml
    with ~100 high-frequency strings (common words, main tabs, drawer, settings,
    block categories, common errors).
  • app/src/main/res/xml/locales_config.xml now advertises id, so the
    Android 13+ per-app language picker exposes Indonesian.
  • docs/CONTRIBUTING-i18n.md "Currently shipping" table refreshed.

Roadmap

Sketchware-Pro-PROFESSIONAL-ROADMAP.md was rewritten to mark which Phase 1
items shipped vs. deferred, and to lay out the Phase 2 task list with a
status column. (That doc lives outside the repo so this PR only affects code.)

Build & artifact

  • :app:assembleRelease — BUILD SUCCESSFUL locally.
  • :app:testReleaseUnitTest — BUILD SUCCESSFUL (14 tests pass).
  • New release published: https://github.com/Dr-Code-EG/Sketchware-Pro/releases/tag/v7.0.0-phase1-r2
    • SketchwarePro-v7.0.0-phase1-r2.apk (124 MB)
    • SHA-256: 8046aa793c9bc16a3ae5a4250dbc3647d31e82f373c47de5e6dfbbf7b4845a3c
    • Signed with the same testkey as r1, so users on r1 can update in place.

Review & Testing Checklist for Human

  • Install the r2 APK on top of r1 and verify a project opens without
    the IllegalStateException in DesignActivity.
  • Open the Logic Editor, the View Editor, and any screen that touches
    ViewPane (e.g. drag-and-drop view editing) to make sure the same
    crash does not appear in those code paths either.
  • In Settings → Language, switch the app to Indonesian and Arabic and
    confirm the new strings render correctly (no missing keys, no RTL
    layout breakage in Arabic).
  • Review SafeCrashlytics to confirm the API surface matches what
    Sketchware will need if/when Firebase is re-introduced.

Notes

  • The "Build APKs" CI job is still expected to fail with the
    pre-existing compileReleaseKotlin issue documented in ADR-0002. The
    same code builds cleanly locally; this PR does not touch the affected
    Kotlin sources, so any failure on CI is unrelated to the changes here.
  • Edge-to-edge display, modular Gradle skeleton, and Compose foundations
    are still in the Phase 2 backlog and will land in subsequent PRs.

Link to Devin session: https://app.devin.ai/sessions/e3921762a25f45138ba2e0180e57b14d


Open in Devin Review

…ash without google-services.json

DesignActivity, LogicEditorActivity, and ViewPane each held a
FirebaseCrashlytics instance in a private final field initialized
via FirebaseCrashlytics.getInstance(). Because Sketchware Pro is
built without google-services.json, the default FirebaseApp is
never auto-initialized, so getInstance() throws IllegalStateException.
Field initializers run before onCreate, so the activity itself fails
to instantiate -- on Ahmed's Samsung A05 (SDK 35) this surfaced as:

  Unable to instantiate activity ComponentInfo{pro.sketchware/
  com.besome.sketch.design.DesignActivity}: java.lang.IllegalStateException:
  Default FirebaseApp is not initialized in this process pro.sketchware.

Introduce pro.sketchware.utility.telemetry.SafeCrashlytics, a thin
null-safe wrapper that resolves the FirebaseCrashlytics delegate lazily
and silently no-ops every call when Firebase is unavailable. The wrapper
will start delegating automatically as soon as a FirebaseApp exists, so
re-enabling telemetry in the future is a single-line change with no
call-site updates.

Phase 2 follow-ups bundled in this commit:
- expand Arabic strings to ~160 (settings, my-projects, theme presets,
  drawer extras, manage-export-url, common errors and search)
- seed Indonesian translation (values-id/strings.xml, ~100 strings)
- advertise 'id' in locales_config.xml so Android 13+ language picker
  exposes the new locale
- update docs/CONTRIBUTING-i18n.md with the new shipping table

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

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.

1 participant