11 Commits

Author SHA1 Message Date
semantic-release-bot
de889b7340 chore(release): 1.17.0 [skip ci]
# [1.17.0](https://github.com/googlemaps-samples/android-samples/compare/v1.16.0...v1.17.0) (2025-10-13)

### Bug Fixes

* images with size zero ([#2290](https://github.com/googlemaps-samples/android-samples/issues/2290)) ([3c4fb12](3c4fb12231))

### Features

* Add EEA Terms of Service notice to README ([#2147](https://github.com/googlemaps-samples/android-samples/issues/2147)) ([6f7e480](6f7e4807c5))
* modernization ApiDemos ([#2288](https://github.com/googlemaps-samples/android-samples/issues/2288)) ([f44422b](f44422bd95))
* updated snippets ([#2289](https://github.com/googlemaps-samples/android-samples/issues/2289)) ([778a365](778a365d12))
* Use Map ID from secrets for Advanced Markers ([#2302](https://github.com/googlemaps-samples/android-samples/issues/2302)) ([092346f](092346f229))
2025-10-13 16:48:11 +00:00
Enrique López-Mañas
7cfb154178
chore: added Lint flow to modules (#2308)
* chore: added Lint flow to modules

* chore: header for lint

* chore: removed abort on error

* chore: remove lint

* chore: fixed lints

* chore: fix permission
2025-10-13 10:40:58 -06:00
Dale Hawkins
092346f229
feat: Use Map ID from secrets for Advanced Markers (#2302)
Updates the Advanced Markers demo to programmatically initialize the map when a custom Map ID is not provided in the string resources. This ensures that a valid Map ID from the secrets file is always used, which is a requirement for Advanced Markers to function correctly.

This change includes:
- Adding detailed comments to both the Java and Kotlin versions of the activity to explain the Map ID loading logic.
- Implementing a fallback mechanism to create the `SupportMapFragment` with a `GoogleMapOptions` object that explicitly sets the Map ID.
2025-10-10 15:18:00 +02:00
Dale Hawkins
ffabd3039d
chore: Update Gradle and standardize on Java 17 (#2306)
* chore: Update Gradle wrapper to version 8.8

Upgrades the Gradle wrapper files to version 8.8 to ensure compatibility with the latest features and performance improvements. This includes updating the wrapper JAR, properties, and shell scripts.

* chore: update gradle version

* chore: Standardize on Java 17

* Update gradle-wrapper.properties

* Update gradle-wrapper.properties

* Update gradle-wrapper.properties

* Update gradle-wrapper.properties

* Update gradle-wrapper.properties

* Update gradle-wrapper.properties

* Update gradle-wrapper.properties

* Update gradle-wrapper.properties

* Update gradle-wrapper.properties

---------

Co-authored-by: Enrique López-Mañas <eenriquelopez@gmail.com>
2025-10-09 22:41:49 +02:00
Enrique López-Mañas
0e44b0716d
docs: updated URLs (#2291)
* docs: updated URLs

* docs: updated URLs

* docs: updated URLs
2025-10-03 09:47:17 -07:00
Dale Hawkins
b8519f44fe
refactor: Centralize SDK versions in libs.versions.toml (#2294)
* refactor: Centralize SDK versions in libs.versions.toml

Moved compileSdk, minSdk, and targetSdk to libs.versions.toml for ApiDemos and snippets projects to ensure consistency and ease of maintenance.

fix: Corrected top bar layout in Kotlin Advanced Markers demo

The Kotlin version of the Advanced Markers demo was missing a call to applyInsets, causing the top bar to overlap with the system UI. This has been corrected to match the behavior of the Java version.

* refactor: Modernize Gradle scripts and update dependencies

This commit refactors the Gradle build scripts for all snippet modules to align with modern Android development practices.

Key changes include:
- Migrating all plugin and dependency declarations to use the version catalog (`libs.versions.toml`).
- Replacing `id("...")` with `alias(libs.plugins...)` for applying plugins.
- Updating numerous library versions, including AGP, Kotlin, and various Jetpack and Google Maps libraries.
- Setting a `namespace` in all module-level `build.gradle.kts` files.
- Enabling Compose and setting the Java toolchain to version 21 across all modules.
- Enabling minification for release builds.
- Removing the legacy `buildscript` block from the root `build.gradle.kts`.

* refactor: removed coreKtx

* refactor: fix build

* refactor: fix build

* refactor: Remove unused Compose configuration from snippet modules

Removed the Jetpack Compose plugin and `compose = true` build feature from all snippet modules as it was not being used.

fix: Update maps-utils snippets

Corrected several issues in the `app-utils` Java snippets:
- Replaced the deprecated `setWeightedData` method with `updateData` in the Heatmaps demo.
- Initialized an empty list in the Heatmaps demo to prevent a potential NullPointerException.
- Added missing R class imports.

---------

Co-authored-by: Enrique López-Mañas <eenriquelopez@gmail.com>
2025-09-26 15:12:17 -06:00
Enrique López-Mañas
f44422bd95
feat: modernization ApiDemos (#2288)
* feat: modernization ApiDemos

* feat: Gradle
2025-09-26 10:02:24 -06:00
Enrique López-Mañas
3c4fb12231
fix: images with size zero (#2290) 2025-09-26 08:25:44 -06:00
Enrique López-Mañas
f66620b88a
chore: fixed paths (#2119) 2025-06-25 12:01:49 -06:00
Enrique López-Mañas
a15cb45067
chore: updated versions (#2135)
* chore: updated versions

* chore: updated snippets

* chore: updated tutorials java

* chore: updated tutorials java

* chore: permission

* chore: permission

* chore: added material
2025-06-25 11:24:13 -06:00
Enrique López Mañas
0595432ad3
chore: unified Java/Kotlin project (#2026)
* chore: unified Kotlin and Java modules

* chore: unified resources

* chore: removed Kotlin

* chore: headers

* chore: headers

* chore: headers

* chore: headers

* chore: added insets

* chore: headers

* chore: renamed

* fix: Refactor map creation, centralize Map ID, add Kotlin boundary controls

This commit refactors how map fragments and Map IDs are handled across the Java and Kotlin demo applications, and introduces feature parity for boundary layer controls in the Kotlin demo.

Key changes include:

- **Programmatic Map Fragment Creation:**
    - Replaced static `<fragment>` map declarations with `<FrameLayout>` containers (`map_fragment_container`) in `data_driven_boundaries_demo.xml` and `data_driven_styling_demo.xml` layouts.
    - Modified `DataDrivenBoundariesActivity` and `DataDrivenDatasetStylingActivity` (Java & Kotlin) to instantiate `SupportMapFragment` programmatically using `SupportMapFragment.newInstance(mapOptions)`.
    - Map options (`GoogleMapOptions`) are now created with the dynamically retrieved Map ID before fragment creation.
      - this allows moving the Map ID out of the xml files

- **Centralized Map ID and Configuration Logic:**
    - Introduced `ApiDemoApplication` in both Java (`java-app`) and Kotlin (`kotlin-app`) modules.
    - This class centralizes Map ID retrieval, checking `BuildConfig.MAP_ID` first, then the `R.string.map_id` resource, providing a consistent source.
    - The Kotlin `ApiDemoApplication` also includes API Key validation on application startup.

- **Kotlin DataDrivenBoundaries Feature Enhancement:**
    - Added boundary layer selection controls (popup menu via `button_feature_type`) to the Kotlin `DataDrivenBoundariesActivity`, achieving parity with the Java version's functionality.
    - Implemented state management for toggling Locality, Administrative Area Level 1, and Country layers.
    - Added dynamic styling logic to apply/remove styles based on layer visibility.
    - Updated feature click handling for country selection, respecting layer activation state.

- **Miscellaneous Improvements:**
    - Added distinct demo titles (`demo_title_java`, `demo_title_kotlin`) in `strings.xml` for better app identification.
    - Updated resource references within Java/Kotlin activities for cleaner imports (e.g., `R.id...` instead of fully qualified names).

* chore: address various lint issues

* fix: explicitly bind checkboxes in the UI

---------

Co-authored-by: dkhawk <107309+dkhawk@users.noreply.github.com>
2025-04-14 14:08:08 -06:00