guardianproject / proofmode-android

THIS REPOSITORY IS MIRROR OF: https://gitlab.com/guardianproject/proofmode/proofmode-android
https://proofmode.org
GNU General Public License v3.0
211 stars 37 forks source link

No location information in CSV #78

Closed bafu closed 2 years ago

bafu commented 3 years ago

Double checked the location-related settings below

  1. In ProofMode -> Change My Settings -> Location, the option is enabled.
  2. In Android Settings -> Apps -> ProofMode -> Permissions -> Location, the option is enabled.
  3. In Android Settings -> Location -> Improve accuracy, both Wi-Fi and Bluetooth scanning are enabled.

Example CSV: 78e7a932447eadd35bd7234d8795cedd3ece630ee6d849b6141601beb7ae7bde.proof.csv

Steps to Reproduce

  1. Take a photo.
  2. Share the photo to ProofMode.
  3. Check the ProofMode content in the CSV.

Environment

n8fr8 commented 3 years ago

Thanks!

n8fr8 commented 3 years ago

Seems related to ACCESS_BACKGROUND_LOCATION and https://developer.android.com/about/versions/oreo/background-location-limits

Working on an update that addresses this in a few ways.

n8fr8 commented 3 years ago

New build for testing: https://github.com/guardianproject/proofmode/releases/tag/0.0.14-BETA-1

n8fr8 commented 3 years ago

https://github.com/guardianproject/proofmode/releases/tag/0.0.14-BETA-2

brylcreem commented 3 years ago

Location and cellinfo weren't being recorded on Beta 1, so I updated to Beta 2 using the File explorer, but it still didn't work.

Then I uninstalled it and reinstalled Beta 2. The settings indicated that everything was turned on, but then I turned off the icons in the settings page and turned them back on, and got the permission dialog from Android.

I gave them the permissions it asked for, but location or cellinfo still weren't recorded in the CSV. The location columns were missing and the cellinfo columns were blank.

Then I went into the app-settings (long-press on the app icon) and saw that it didn't have media or phone permissions, even though I had given it phone permission earlier.

After I gave it all permissions, it now records location and cellinfo accurately.

n8fr8 commented 3 years ago

Interesting. We'll look into how we are checking for and re-displaying/requesting the correct permissions moving forward.

The main change is we had to ask for BACKGROUND location permission, aka "always on location". Now, this may still cause some issues moving forward, as Android can throttle those requests, so we are looking into other solutions including using Google's FusedLocationProvider (which gets throttled less) and/or a persistent foreground service.

Thanks for the feedback and testing!

bafu commented 3 years ago

Thanks for creating and sharing the new build, Nathan!

ProofMode Beta2 did not add geolocation information into proof in my case.

Steps to Reproduce

  1. Removed the installed ProofMode and installed the Beta2.
  2. Confirmed that ProofMode has system permissions to access camera/location/phone/storage.
  3. Took a photo by the built-in camera App.
  4. Shared the photo with ProofMode.
  5. ProofMode generated a proof.
    1. The location icon did not appear on the Android notification bar during the proof generation.

Logs

Environments

  1. ProofMode: 0.0.14-BETA-2
  2. Phones
    1. Samsung Galaxy Z Fold2 5G, Android 11
    2. HTC 10, Android 8.0.0
n8fr8 commented 3 years ago

Thanks for the feedback. We'll do some more targeted testing on Galaxy devices next.