Skip to content

chore: integrate location module into sample apps#658

Merged
Shahroz16 merged 1 commit intofeat/real-time-locationfrom
feat/location-sample-app
Feb 18, 2026
Merged

chore: integrate location module into sample apps#658
Shahroz16 merged 1 commit intofeat/real-time-locationfrom
feat/location-sample-app

Conversation

@Shahroz16
Copy link
Contributor

@Shahroz16 Shahroz16 commented Feb 16, 2026

Summary

  • Register ModuleLocation() in both Kotlin Compose and Java sample apps
  • Add location permission request launcher (fine + coarse) in MainActivity
  • Add three location action buttons to the dashboard: Request Permission, Set Manual Location, Request Location Once
  • Add setManualLocation() and requestLocationOnce() to DashboardViewModel
  • Add location module dependency to sample app gradle config

Note

Medium Risk
Adds location permissions and runtime location flows in the sample app, which can affect privacy/permission behavior and introduce device-dependent edge cases, but is isolated to samples/testing UI.

Overview
Adds the Customer.io location module to the sample apps: includes a new :location dependency, registers ModuleLocation() during SDK initialization in both the Java Layout and Kotlin Compose samples, and requests ACCESS_FINE_LOCATION in the Java sample manifest.

Introduces a new Java LocationTestActivity (linked from a new Dashboard button) with UI/resources to set preset/manual coordinates, fetch device location, and trigger/stop SDK location updates, including runtime permission handling and settings fallback dialogs.

Written by Cursor Bugbot for commit 55ea6ca. This will update automatically on new commits. Configure here.

@Shahroz16 Shahroz16 requested a review from a team as a code owner February 16, 2026 11:54
@github-actions
Copy link

github-actions bot commented Feb 16, 2026

Sample app builds 📱

Below you will find the list of the latest versions of the sample apps. It's recommended to always download the latest builds of the sample apps to accurately test the pull request.


@Shahroz16 Shahroz16 self-assigned this Feb 16, 2026
@codecov
Copy link

codecov bot commented Feb 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (feat/real-time-location@42f29b8). Learn more about missing BASE report.

Additional details and impacted files
@@                    Coverage Diff                     @@
##             feat/real-time-location     #658   +/-   ##
==========================================================
  Coverage                           ?   68.19%           
  Complexity                         ?      760           
==========================================================
  Files                              ?      142           
  Lines                              ?     4323           
  Branches                           ?      582           
==========================================================
  Hits                               ?     2948           
  Misses                             ?     1149           
  Partials                           ?      226           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link

  • kotlin_compose: feat/location-sample-app (1771242921)

@github-actions
Copy link

Build available to test
Version: feat-location-sample-app-SNAPSHOT
Repository: https://central.sonatype.com/repository/maven-snapshots/

@github-actions
Copy link

  • java_layout: feat/location-sample-app (1771242922)

@github-actions
Copy link

github-actions bot commented Feb 16, 2026

📏 SDK Binary Size Comparison Report

No changes detected in SDK binary size ✅

@Shahroz16 Shahroz16 force-pushed the feat/location-one-shot branch from 2a698db to c710f0e Compare February 16, 2026 13:03
@Shahroz16 Shahroz16 force-pushed the feat/location-sample-app branch from 25d3082 to 5503e87 Compare February 16, 2026 13:03
@github-actions
Copy link

  • java_layout: feat/location-sample-app (1771247061)

@github-actions
Copy link

  • kotlin_compose: feat/location-sample-app (1771247066)

@Shahroz16 Shahroz16 force-pushed the feat/location-one-shot branch from c710f0e to 03eb67c Compare February 16, 2026 16:40
@Shahroz16 Shahroz16 force-pushed the feat/location-sample-app branch from 5503e87 to 40ea244 Compare February 16, 2026 16:41
@github-actions
Copy link

  • java_layout: feat/location-sample-app (1771260138)

@github-actions
Copy link

  • kotlin_compose: feat/location-sample-app (1771260148)

@Shahroz16 Shahroz16 force-pushed the feat/location-one-shot branch from 03eb67c to c690302 Compare February 16, 2026 18:12
@Shahroz16 Shahroz16 force-pushed the feat/location-sample-app branch from 40ea244 to f26fe5f Compare February 16, 2026 18:13
@github-actions
Copy link

  • java_layout: feat/location-sample-app (1771265875)

@github-actions
Copy link

  • kotlin_compose: feat/location-sample-app (1771265845)

@Shahroz16 Shahroz16 force-pushed the feat/location-one-shot branch from c690302 to 060c288 Compare February 16, 2026 18:49
@Shahroz16 Shahroz16 force-pushed the feat/location-sample-app branch from f26fe5f to a6e2a88 Compare February 16, 2026 18:49
@github-actions
Copy link

  • java_layout: feat/location-sample-app (1771267827)

@github-actions
Copy link

  • kotlin_compose: feat/location-sample-app (1771267829)

@Shahroz16 Shahroz16 force-pushed the feat/location-one-shot branch from 060c288 to fe5c170 Compare February 17, 2026 10:03
@Shahroz16 Shahroz16 force-pushed the feat/location-sample-app branch from a6e2a88 to 9019907 Compare February 17, 2026 10:03
@github-actions
Copy link

  • java_layout: feat/location-sample-app (1771322866)

@github-actions
Copy link

  • kotlin_compose: feat/location-sample-app (1771322874)

@Shahroz16 Shahroz16 force-pushed the feat/location-one-shot branch from fe5c170 to 3a4bb53 Compare February 17, 2026 10:29
@Shahroz16 Shahroz16 force-pushed the feat/location-sample-app branch from 9019907 to c405a99 Compare February 17, 2026 10:29
@Shahroz16 Shahroz16 force-pushed the feat/location-sample-app branch from 5a046b9 to c03531e Compare February 18, 2026 13:52
@Shahroz16 Shahroz16 force-pushed the feat/location-one-shot branch from 5590940 to 6772e13 Compare February 18, 2026 13:52
)
)
.addCustomerIOModule(ModuleMessagingPushFCM())
.addCustomerIOModule(ModuleLocation())
Copy link

Choose a reason for hiding this comment

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

Kotlin Compose sample missing location dashboard features

Medium Severity

ModuleLocation() is registered in the Kotlin Compose sample but no corresponding UI was added. The PR description explicitly mentions adding setManualLocation() and requestLocationOnce() to DashboardViewModel and adding location action buttons to the dashboard — but neither DashboardViewModel.kt nor Dashboard.kt was modified. The module is initialized with no way for users to interact with it.

Fix in Cursor Fix in Web

@Shahroz16 Shahroz16 force-pushed the feat/location-one-shot branch from 6772e13 to ce9255c Compare February 18, 2026 13:58
@Shahroz16 Shahroz16 force-pushed the feat/location-sample-app branch from c03531e to 077856a Compare February 18, 2026 13:58
@github-actions
Copy link

  • kotlin_compose: feat/location-sample-app (1771422834)

@github-actions
Copy link

  • java_layout: feat/location-sample-app (1771423007)

@github-actions
Copy link

  • java_layout: feat/location-sample-app (1771423641)

@github-actions
Copy link

  • kotlin_compose: feat/location-sample-app (1771423629)

@Shahroz16 Shahroz16 force-pushed the feat/location-one-shot branch from ce9255c to e8f0aae Compare February 18, 2026 14:34
@Shahroz16 Shahroz16 force-pushed the feat/location-sample-app branch from 077856a to bde23f5 Compare February 18, 2026 14:35
@github-actions
Copy link

  • kotlin_compose: feat/location-sample-app (1771425359)

@github-actions
Copy link

  • java_layout: feat/location-sample-app (1771425634)

Base automatically changed from feat/location-one-shot to feat/real-time-location February 18, 2026 14:58
@github-actions
Copy link

  • java_layout: feat/location-sample-app (1771426289)

@github-actions
Copy link

  • kotlin_compose: feat/location-sample-app (1771426289)

@Shahroz16 Shahroz16 force-pushed the feat/location-sample-app branch from bde23f5 to 918e317 Compare February 18, 2026 15:04
@github-actions
Copy link

  • java_layout: feat/location-sample-app (1771427142)

@github-actions
Copy link

  • kotlin_compose: feat/location-sample-app (1771427146)

@Shahroz16 Shahroz16 force-pushed the feat/location-sample-app branch from 918e317 to 7855636 Compare February 18, 2026 18:03
Register ModuleLocation in both sample apps. Add location testing UI
to the Java sample app: request location permission, set manual
location, and request one-shot SDK-managed location.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Shahroz16 Shahroz16 force-pushed the feat/location-sample-app branch from 7855636 to 55ea6ca Compare February 18, 2026 18:09
@github-actions
Copy link

  • kotlin_compose: feat/location-sample-app (1771437885)

@github-actions
Copy link

  • java_layout: feat/location-sample-app (1771437871)

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

? LocationManager.GPS_PROVIDER
: LocationManager.NETWORK_PROVIDER;

locationManager.requestSingleUpdate(provider, locationListener, null);
Copy link

Choose a reason for hiding this comment

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

GPS provider crashes when only coarse permission granted

Medium Severity

isLocationPermissionGranted() returns true when only ACCESS_COARSE_LOCATION is granted, but fetchDeviceLocation() may select GPS_PROVIDER which requires ACCESS_FINE_LOCATION. On Android 12+, users can choose "Approximate" location, granting only coarse permission. In that scenario, requestSingleUpdate with GPS_PROVIDER throws a SecurityException, crashing the app. The provider selection needs to account for which specific permission was actually granted.

Additional Locations (1)

Fix in Cursor Fix in Web

@github-actions
Copy link

  • java_layout: feat/location-sample-app (1771438456)

@github-actions
Copy link

  • kotlin_compose: feat/location-sample-app (1771438446)

@Shahroz16 Shahroz16 merged commit 1e96357 into feat/real-time-location Feb 18, 2026
37 checks passed
@Shahroz16 Shahroz16 deleted the feat/location-sample-app branch February 18, 2026 18:39
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.

2 participants