Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Capture location] Prompt for location permissions when capture location task is opened #2818

Merged
merged 5 commits into from
Nov 13, 2024

Conversation

anandwana001
Copy link
Collaborator

@anandwana001 anandwana001 commented Nov 11, 2024

Fixes #2658

@shobhitagarwal1612 PTAL?

Case 1

Happy Case - Location Permission Given on Home Page, before Data Collection
https://github.com/user-attachments/assets/31e28419-f758-4c7a-8c02-6b9e2822ca56

Case 2

If the user does not allow the location requested inside the CaptureLocation Data Collection
https://github.com/user-attachments/assets/e9b86938-a9ab-4b33-b804-142c6695ae1b

Case 3

If the user allow the location by using the dialog allow feature and turning on off device location
https://github.com/user-attachments/assets/03b1a197-07a1-4896-95f0-56b09270c7f6

Other cases happening

  • User is able to click on location lock button now
  • If User Cancel, then the capture button will be disabled
  • As per the Android SDK, is user has selected, Don't Allow, the Android permission request Dialog will not be shown to user again and again
  • User can either skip, or if task is required, user can cancel by using the cross button

Copy link

codecov bot commented Nov 12, 2024

Codecov Report

Attention: Patch coverage is 10.14493% with 62 lines in your changes missing coverage. Please review.

Project coverage is 61.37%. Comparing base (5f7c649) to head (6736c6c).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
...lection/tasks/location/LocationPermissionDialog.kt 0.00% 35 Missing ⚠️
...n/tasks/location/CaptureLocationTaskMapFragment.kt 19.23% 20 Missing and 1 partial ⚠️
...ion/tasks/location/CaptureLocationTaskViewModel.kt 25.00% 5 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2818      +/-   ##
============================================
- Coverage     61.86%   61.37%   -0.49%     
- Complexity     1166     1169       +3     
============================================
  Files           265      266       +1     
  Lines          6243     6304      +61     
  Branches        882      899      +17     
============================================
+ Hits           3862     3869       +7     
- Misses         1854     1907      +53     
- Partials        527      528       +1     
Files with missing lines Coverage Δ
...google/android/ground/system/PermissionsManager.kt 91.66% <ø> (ø)
...ion/tasks/location/CaptureLocationTaskViewModel.kt 46.42% <25.00%> (+1.98%) ⬆️
...n/tasks/location/CaptureLocationTaskMapFragment.kt 36.58% <19.23%> (-19.67%) ⬇️
...lection/tasks/location/LocationPermissionDialog.kt 0.00% <0.00%> (ø)

Copy link
Collaborator

@gino-m gino-m left a comment

Choose a reason for hiding this comment

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

LG, just a few nits.

@gino-m gino-m merged commit e2fcc7b into master Nov 13, 2024
4 checks passed
@gino-m gino-m deleted the anandwana001/2658/allow-location-dialog branch November 13, 2024 13:40
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.

[Capture location] Prompt for location permissions when capture location task is opened
4 participants