Get Geotagged photos

Hi, iam new in Odk, How can i get geotagged photos using odk?
The problem is, i have created a form and have got a field to get photos, i get the photos but when i copy the photos from the instances folder to PC if i import in QGIS for exemple using teh geotagged photos module it does says the photoes are not geotagged.

Rosário Dilo
Best regards

Hi @RD

it depends on the camera app you use. Probably your app doesn't contain that function (saving location with photos) or it's just disabled.

Please check settings in that camera app or try to install any other.

For example in my app there is an option disabled by defult:

1 Like

Hi, Thanks, i could realize also only today that it is only a metter of configuration the camera app on the android activating the location tag.

Best regards

3 Likes

Hi @Grzesiek2010,

I have the very same issue with Android 10 (Samsung A7 2018) although all possible location configurations are updated/allowed.

I have try "capturing images" via 2 different apps (default Android Camera App and Open Camera) in the same form and the result:

  • only those images captured by Open Camera App have geo-tagged information in them
  • while those captured by Stock Camera does not.

I did a further research and found this : https://source.android.com/devices/tech/config/tristate-perms#incremental-permissions-screens

So I would assume that this tri-state location permissions feature do not allowed curtain (camera) applications to get location information (while they are being used in the background). I am not quite sure whether this assumption is correct. !!????!??

Do we have any other "work-around" for this one ? BTW, even ODK latest version(v28) has this issue,

Hi @MyName

welcome to the forum! Please introduce yourself here!

I have try "capturing images" via 2 different apps (default Android Camera App and Open Camera) in the same form and the result:
only those images captured by Open Camera App have geo-tagged information in them
while those captured by Stock Camera does not.

As I understand it's the result when you used those apps via ODK Collect, right? If so is the result different if you use those apps directly?

Hi @Grzesiek2010

Correct !!! Those apps are running "in the background" (with ODK Collect in the foreground off-course).

If I use them directly (say, open each app in the foreground and capture image from each of them then), the captured images (from both) do contain geo-tagged information (visible in Gallery Apps).

Hi @Grzesiek2010,

What would you suggest ? or do you need any further information ?.
I have been trying to get into ODK Collect source code (default image widget) without any luck.
This might be camera-app-specific as far as Android 10 location permissions concern. If this is the case, there seems to have no "work-around" then.

I'm not sure what you mean by foreground/background. My question was about the result when you start those camera apps directly clicking their icons from your devices's screen vs starting them from Collect using the Image widget for example. Could you clarify?

Thank you @Grzesiek2010 for your prompt reply.

Yes, the result is as:

  • result is the same (if Open Camera app is used).

  • result is different (if Stock Camera App is used). The difference is:

    • if I use the app DIRECTLY (clicking their icons from your devices's screen, as you said), geo information IS available.
    • if i use the app INDIRECTLY (starting them from Collect using the Image widget for example), no geo information IS NOT available.

Thank you very much for the support @Grzesiek2010

Open Camera is https://play.google.com/store/apps/details?id=net.sourceforge.opencamera&hl=en right?
Could you provide a link to that second one which doesn't work well?
Why can't you just use the one that works fine?

Hi @Grzesiek2010,

Yes, Exactly this one.

I cannot find the name of the other one (which I would like to know as well) but here is the screenshot just captured:

It would be out of question requesting clients to download/install apps onto their devices ;(

It would be out of question requesting clients to download/install apps onto their devices ;(

I understand but if the app that doesn't work well is a default camera app on your device it doesn't necessarily mean that your clients have the same camera apps right? Or maybe you have control over it and you can confirm what apps they use? I'm not sure if it's a bug on our side or not I need to investigate it but assuming it's not our bug it's difficult to control all those various default camera apps.

No, With what has been said in previous comments, I dont think it's a bug at ODK Collect but rather an issue with tristate location permission feature introduced since Android 10.

I would love to know if anyone has similar issue (and could confirm my assumption above) and how people "work-around" from that one.

Thank you @Grzesiek2010. :wink:

Hi, I confirm there's an issue with Android 10/Tristate when an app like ODK Collect is using the camera app to take picture by invoking an intent as described in Take a photo with a camera app

The issue is that when the camera app does not have the "Allow all the time" permission granted for Location, it will not store the location tag with the image, whatever permission is given to the application invoking the intent.

So the problem is also there for any camera app in Android 10, if the user choose "Allow only if the app is in use" for the camera app.

We've tested this with ODK Collect and other apps invoking the MediaStore.ACTION_IMAGE_CAPTURE intent.

It's not a Collect bug, but it can impact all the Collect users who are making use of the Location tag in images taken with Collect for Android version 10 and above.

If there is an interest from the community, my team could contribute a new option in Collect app settings to let users add Location data to photos taken with Collect, independently of the camera app.

Looking forward to get some feedback from users and developers on that.

Hi @racetiger
thanks for sharing the details. @mmarciniak90 @kkrawczyk123 are you able to reproduce the issue on our devices?

Hi everyone!
@Grzesiek2010, I was able to reproduce the described problem.
When I take a photo from the default Camera app and I look at the details in the Photos app, I see location.
When I take a photo in Collect and I look at the details in the Photos app, I don't see location.

I also attached photo to Collect, which was created by default Camera app with location. When I checked this photo in Photo app, location wasn't available.

Additionally, it's not a problem only on Android 10. I was also able to reproduce this issue on Android 7 and 8.1.

Verified on current master, v1.28.2 and v1.27.3.

We just experienced the same issue.
The Camera app properly records the location when opened directly. When accessed through ODK Collect, no location stored.

Android version 10
ODK Collect 1.28.4

I have just added a proposal at Option to add EXIF Location when it's not available by camera app

Could you guys kindly review ?
Thank you