Collect not prompting for GPS settings dialogue

Hi,

I am on ODK Collect v2022.1 Beta 2. In a location question, the app did not prompt for switching on GPS location, when in phone settings it was originally off. It just kept searching for it without intimation.

Regards,
Saad

Do you know which version of Android your device is using?

Huawei P10 lite, Android v8.

here I face the same problem (same form and both phones started without location) on :

  • a Galaxy S5 running Android 6.0.1.
  • a Huawei P8 Lite runnig Android 8

Same behaviour on Samsung Galaxy S5 SM-G900F, Android 11 (Lineage).

Location off before starting ODK Collect, no prompt to turn location on (or 'sorry location providers are disabled!' message before the jump to settings-location)

Are you talking about this dialog which should be displayed when your form contains start-geopoint question but location is disabled?

Yes, the phone try to get a location but never ask for enable location providers.

I'm not able to find anything unexpected with location permissions in v2021 Beta 1. @mathieubossaert @Saad @ahblake are you able to share the forms you're using and the exact steps that get you to the problem?

Also, @ahblake are you using Lineage without Play Services (or microG) installed?

This very simple one :
test_gps_prompt.xlsx (10.3 KB)
Or this other one https://forum.getodk.org/uploads/short-url/xkmejtpK2OphnimglfLixjo8Z8K.xlsx

Start Collect with your GPS inactive. Collect will tell you this form will track you. Accept and it will try to fix a location without asking you to activate the GPS (like @Grzesiek2010's screenshot)

MindTheGapps package for Lineage 18.1

  • Start with location off
  • Open Collect,
    • S5 / Collect 2022.1 Beta 2:
      • Geopoint immediately attempts to acquire location but with accuracy = "--" and hangs until cancelled or Location enabled. The new geopoint dialogue appears over the form screen (i.e. I can see the widget label / 'Start GeoPoint' button in the background)
      • Start a GeoPoint with `placement-map' / GeoTrace / Geoshape: "GPS is disabled on your device. Would you like to enable it? Cancel / Enable GPS". Enable jumps to Location settings
    • S10 / Collect 2021.3.4:
      • Geopoint: "Sorry, Location providers are disabled!" message and jumps to Location settings. Turning location on, then back, then 'start geopoint' again begins to acquire location. Location dialogue appears over a blank screen.
      • Start a GeoPoint with `placement-map' / GeoTrace / Geoshape: "GPS is disabled on your device. Would you like to enable it? Cancel / Enable GPS". Enable jumps to Location settings

Geopoint_beta.xlsx (21.6 KB)

Thanks for the clarification @mathieubossaert and @ahblake. I think I see what's going on. Just to make sure I'm going down the right track, when you saying you're disabling/activating location/GPS are you referring to doing so in the system "Location" settings (screenshot below)?

Location permissions can be enabled/disabled for an individual app in Settings > Apps which is what I thought you were referencing, but I seem to run into the problems you described when disabling Location at the system level.

Thanks for your investigations. I am refering to the system location setting.

Yes, accessed from the pull down tray

@mathieubossaert @ahblake thanks again for the details! @saad I'm going to assume you were also using the system "Location" settings but let us know if not. It looks like we don't account for the case where we have permission to access location, but location services have been disabled.

Yes, actually I wrote the same thing in the first message of this thread :slight_smile:

Works fine now in Collect 2022.1 :wink: :+1:

3 Likes