chore: integrate location module into sample apps#658
chore: integrate location module into sample apps#658Shahroz16 merged 1 commit intofeat/real-time-locationfrom
Conversation
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. |
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
|
|
Build available to test |
|
📏 SDK Binary Size Comparison ReportNo changes detected in SDK binary size ✅ |
2a698db to
c710f0e
Compare
25d3082 to
5503e87
Compare
|
|
c710f0e to
03eb67c
Compare
5503e87 to
40ea244
Compare
|
|
03eb67c to
c690302
Compare
40ea244 to
f26fe5f
Compare
|
|
c690302 to
060c288
Compare
f26fe5f to
a6e2a88
Compare
|
|
060c288 to
fe5c170
Compare
a6e2a88 to
9019907
Compare
|
|
fe5c170 to
3a4bb53
Compare
9019907 to
c405a99
Compare
5a046b9 to
c03531e
Compare
5590940 to
6772e13
Compare
...out/src/main/java/io/customer/android/sample/java_layout/ui/dashboard/DashboardActivity.java
Show resolved
Hide resolved
| ) | ||
| ) | ||
| .addCustomerIOModule(ModuleMessagingPushFCM()) | ||
| .addCustomerIOModule(ModuleLocation()) |
There was a problem hiding this comment.
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.
6772e13 to
ce9255c
Compare
c03531e to
077856a
Compare
|
|
|
|
ce9255c to
e8f0aae
Compare
077856a to
bde23f5
Compare
|
|
|
|
bde23f5 to
918e317
Compare
|
|
918e317 to
7855636
Compare
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>
7855636 to
55ea6ca
Compare
|
|
| ? LocationManager.GPS_PROVIDER | ||
| : LocationManager.NETWORK_PROVIDER; | ||
|
|
||
| locationManager.requestSingleUpdate(provider, locationListener, null); |
There was a problem hiding this comment.
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)
|
|


Summary
ModuleLocation()in both Kotlin Compose and Java sample appsMainActivitysetManualLocation()andrequestLocationOnce()toDashboardViewModellocationmodule dependency to sample app gradle configNote
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
locationmodule to the sample apps: includes a new:locationdependency, registersModuleLocation()during SDK initialization in both the Java Layout and Kotlin Compose samples, and requestsACCESS_FINE_LOCATIONin 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.