KEMBAR78
Comparing v6.11.0...v6.12.0 · googlemaps/android-maps-compose · GitHub
Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: googlemaps/android-maps-compose
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v6.11.0
Choose a base ref
...
head repository: googlemaps/android-maps-compose
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v6.12.0
Choose a head ref
  • 2 commits
  • 11 files changed
  • 2 contributors

Commits on Sep 30, 2025

  1. feat: Improve GoogleMapsInitializer error handling and retries (#778)

    * fix: Improve GoogleMapsInitializer error handling and allow retries
    
    Refactored the error handling within `GoogleMapsInitializer` to make it more robust against initialization failures.
    
    Previously, any exception during the `initialize` call would permanently set the state to `FAILURE`, preventing any subsequent attempts.
    
    This change introduces more granular error handling:
    - Unrecoverable errors, such as `GooglePlayServicesMissingManifestValueException`, will correctly set the state to `FAILURE`.
    - Other exceptions, which may be transient, will now reset the state to `UNINITIALIZED`, allowing the initialization to be attempted again.
    
    Additionally, a `forceInitialization` parameter has been added to the `initialize` function to allow bypassing the initial state check for re-initialization scenarios.
    
    * feat: More improvements to GoogleMapsInitializer
    
    Introduced a new `preferredRenderer` parameter to the `initialize` function.
    
    Key changes:
    - The `initialize` function now accepts a `preferredRenderer` to specify which Maps renderer to use.
    - The `try-catch` block within the `initialize` function has been refactored to be more idiomatic.
    
    The `AdvancedMarkersActivity` example has been updated to use this improved initializer. It now calls `GoogleMapsInitializer.initialize` within a `LaunchedEffect`, making the initialization asynchronous and tied to the composable's lifecycle.
    
    * refactor: Remove preferredRenderer from Maps initialization
    
    The `preferredRenderer` parameter has been removed from the `GoogleMapsInitializer.initialize()` function. The Maps SDK for Android now automatically selects the latest available renderer, making this parameter redundant.
    
    This change simplifies the initialization API. The explicit initialization call in the `AdvancedMarkersActivity` sample has also been removed to reflect this simplification.
    
    * feat(maps-compose): Introduce interface-based GoogleMapsInitializer
    
    This commit refactors the `GoogleMapsInitializer` from a static object to an interface-based dependency provided via a `CompositionLocal`.
    
    This architectural change offers several key benefits:
    - **Improved Testability:** The initialization logic can now be easily mocked and tested in isolation, as demonstrated by the new unit tests using `mockk`.
    - **Dependency Injection:** It aligns with modern dependency injection principles, making the `GoogleMap` composable more configurable and less reliant on a global singleton.
    - **Robustness:** The error handling has been made more granular, distinguishing between unrecoverable manifest errors and transient, recoverable issues.
    
    The new `DefaultGoogleMapsInitializer` provides the concrete implementation, ensuring backward compatibility for existing usages while enabling advanced testing and customization scenarios.
    dkhawk authored Sep 30, 2025
    Configuration menu
    Copy the full SHA
    4e3770d View commit details
    Browse the repository at this point in the history
  2. chore(release): 6.12.0 [skip ci]

    # [6.12.0](v6.11.0...v6.12.0) (2025-09-30)
    
    ### Features
    
    * Improve GoogleMapsInitializer error handling and retries ([#778](#778)) ([4e3770d](4e3770d))
    semantic-release-bot committed Sep 30, 2025
    Configuration menu
    Copy the full SHA
    7c6ee5a View commit details
    Browse the repository at this point in the history
Loading