Make it mandatory to have GPS turned on to fill a form

How do I make GPS activated mandatory to collect data?
I want to know the coordinates of the site where the survey is carried out, but if the person turns off the GPS, the coordinate is not being recorded

Collect cannot control the Android system in this way.

1 Like

One approach you can try is ask enumerators to turn on GPS as a requirement of employment. Then turn on form audit log and you see when location permissions or providers are enabled/disabled in the data. When you see that, contact the enumerator and ask why.


Thanks for your answers, both options are interesting.

1 Like

We use this in our forms:

# Survey
- type: select_one WhyNoGPS
  name: WhyNoVisitGPS
  label::English (en): Why did you skip the GPS coordinates?
  label::Français (fr): Pourquoi n'avez-vous pas saisi les coordonnées GPS?
  hint::English (en): If possible, please go back and capture them; it helps us a lot.
  hint::Français (fr): Si possible, retournez en arrière et saisissez les coordonnées. Elles sont importantes.
  required: yes
  relevant: ${VisitGPS} = ""
- type: text
  name: WhyNoVisitGPSOther
  label::English (en): Other reason why GPS was skipped
  label::Français (fr): Autre raison pour laquelle les coordonnées GPS n'ont pas été saisies
  required: yes
  relevant: ${WhyNoVisitGPS} = 'other'
  constraint: regex(., '.{3,}')
  constraint_message::English (en): Please enter at least three letters.
  constraint_message::Français (fr): Entrez au moins trois charactères svp.

# Choices
- list_name: WhyNoGPS
  name: gps_takes_too_long
  label::English (en): It takes too long to get GPS coordinates
  label::Français (fr): Saisir les coordonnées GPS prend trop de temps
- list_name: WhyNoGPS
  name: gps_unsupported
  label::English (en): My phone cannot take GPS coordinates at all
  label::Français (fr): Mon téléphone ne peut pas saisir le GPS du tout
- list_name: WhyNoGPS
  name: gps_bad_conditions
  label::English (en): Current conditions (like trees, clouds) make it impossible to get GPS coordinates
  label::Français (fr): Les conditions sont trop mauvaises (p.ex arbres, nuages)
- list_name: WhyNoGPS
  name: other
  label::English (en): Other, please specify
  label::Français (fr): Autre, veuillez préciser
1 Like

I really like all of the approaches described so far.

To add to @yanokwa and @Sjlver's approaches, when I've worked with projects that need to have coordinates (or any other piece of data) I've made sure to have a live-updating dashboard or data table to see missing GPS coordinates in real time. This can be as simple as an Excel spreadsheet connected to the OData feed with a conditionally formatted column. That way submissions that come in with a missing location are visible and you can immediately follow up with the data collector and course-correct.

For longer-running projects with known staff, it might be worth looking into Mobile Device Management software which locks down devices and provides remote access for managing things like updates and settings changes.

@cooperka am I remembering correctly that you've worked with projects that use Microsoft Intune? That might only be reasonable for really large projects but it'd be helpful to hear a bit about your experience if you're up for sharing.

I don't have much experience with MDM solutions but if I needed to set it up for a small to mid size project I would first look at VMWare's ONE unified endpoint management. In particular, it supports scenarios in which data collectors use their own devices.

1 Like

Yes I'm pretty sure TCC used MS Intune to configure stuff on the scale of thousands of smartphones. Unfortunately I haven't worked with it myself, and the person who set it all up has since left TCC so I have no details available to share :crazy_face:

Found something actually! This is pretty neat:

Here is the process for enrolling the devices to InTune.

  1. Unbox device
  2. Turn on device
  3. Select English
  4. Setup wifi
  5. At prompt for entering google account information use “afw#setup” to activate Android for Work, then select “Next”
  6. Wait for opportunity to enroll device by scanning intune QR code and you're done