opensrp / fhircore

FHIR Core / OpenSRP 2 is a Kotlin application for delivering offline-capable, mobile-first healthcare project implementations from local community to national and international scale using FHIR and WHO Smart Guidelines on Android.
https://smartregister.org
Apache License 2.0
50 stars 39 forks source link

Add Check for Distance Calculation Feature to Prevent Location Permissions Prompt for All Projects #3274

Closed qiarie closed 1 month ago

qiarie commented 1 month ago

Describe the bug With the implementation of distance calculation feature, setup for location services implemented in the main activity runs for every project.

There's a need to only process location services for projects have the feature enabled.

To Reproduce Steps to reproduce the behavior:

  1. Run an app that does not have distance calculation as a feature
  2. Set up and login to the app
  3. On loading the register, a prompt to give location permissions to the app shows

Expected behavior Only apps that use distance calculation in rules should prompt users to allow location permissions.

Screenshots Screenshot_1715865579