numbersprotocol / starling-capture

A photo-sharing app with only verifiable photos and videos for professionals.
https://numbersprotocol.io/
GNU General Public License v3.0
17 stars 4 forks source link

Missing GPS info in many captures #186

Open benhylau opened 2 years ago

benhylau commented 2 years ago

Description

In a deployment of a modified version of the app, we collected ~650 photos, but about 30-40% were missing location information. It seems that both Current and Last Known GPS info were missing in the metadata.

We tried opening Google Maps to get an updated location on the device, then return to the app. This may have improved results in some cases, sometimes those phones would start sending a location, but this does not work reliably.

I wonder if you have seen similar issues, and whether something in here may be improved to more reliably get a GPS location: https://github.com/numbersprotocol/android-info-snapshot/blob/b907e94dd0160ac451c31aecc18793488c1704c6/infosnapshot/src/main/java/io/numbersprotocol/infosnapshot/factories/LocationInfoFactory.kt#L20

Would getLastLocation() and getCurrentLocation() help here? https://developer.android.com/training/location/retrieve-current#BestEstimate

Steps to Reproduce

  1. Connect to Canon camera.
  2. Take photos.
  3. Look at photo metadata received on server, find that location data is missing.
  4. I suspect that when this happens, if you look at InfoSnapshot screen, the photo location metadata would be missing as well.

Expected Behavior

Logs

All relevant permissions are accepted. Information Providers in the app are enabled. This happens on phones occasionally, the same phones that would have location at other times.

Environment