Skip to content

Fall back to OpenStreetMap when the build has no Google Maps key - #243

Open
alex-so-3 wants to merge 1 commit into
parawanderer:mainfrom
alex-so-3:fix/osm-without-maps-key
Open

alex-so-3 wants to merge 1 commit into
parawanderer:mainfrom
alex-so-3:fix/osm-without-maps-key

Conversation

@alex-so-3

@alex-so-3 alex-so-3 commented Sep 28, 2026 •

Copy link
Copy Markdown

A build without MAPS_API_KEY crashes when the map screen opens (a fork, or a local build without secrets.properties). CONTRIBUTING says the app builds without a key but the map will not load; in practice the app does not start.

When the build has no Maps key and Google Maps is the chosen provider, MapProviderFactory.effectiveProvider falls back to OpenStreetMap, which needs no key. The map screen and the history screen both use it. Builds with a key behave exactly as before, and AMap is untouched.

Verified: on a phone, a debug build without a key: the app starts and shows OSM on the map and in history. ./gradlew testAll and add_strings.py --check pass.

The map screen threw at start without MAPS_API_KEY; OSM needs no key, so it now
stands in for Google in both the map and the history screen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016xeHfDLMuUeusX9PEgNEmY

This branch has not been deployed

No deployments
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