Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In-app camera fails to record location information sometimes #5254

Open
RitikaPahwa4444 opened this issue Jul 7, 2023 · 7 comments
Open

Comments

@RitikaPahwa4444
Copy link
Collaborator

Summary

The in-app camera fails to record location information sometimes, especially during the first run due to GPS initialisation delay. Since the in-app camera uses the default camera application on the device (which in turn undergoes the same GPS initialisation process), pictures lose location information despite having all the necessary conditions satisfied. This may be a bit surprising for users who turn their location on but still get a "No location found" popup in the upload wizard.

Please refer to this comment for more details about the GPS initialisation process.

Some brilliant ideas have been suggested here by @kartikaykaushik14 that may be undertaken to educate our users about the delay required to record picture location.

Steps to reproduce

  1. Open the in-app camera in the Contribution/Nearby fragment (on a fresh installation mostly)
  2. Allow the app to record location for the in-app shot (this step is subject to PR 5196: Fix in-app camera location loss #5249 getting merged but the issue still remains for the default camera application used in subsequent steps)
  3. Click a picture
  4. Proceed to the upload wizard and fill the caption and description
  5. Tap on Next

Expected behaviour

"Location not found" popup should not be shown. The picture should have location information either in its EXIF or the app should use the current location of the user.

Actual behaviour

"Location not found" popup is displayed. Neither the picture, nor the app has recorded location information.

Device name

Redmi 5A

Android version

8.1.0

Commons app version

master and prodDebug

Device logs

No response

Screen-shots

No response

Would you like to work on the issue?

None

@rohit9625
Copy link
Contributor

Is this still happening with the updated main branch? I just tried reproducing this issue, but it works fine on my device.
When was the last you encountered this problem @RitikaPahwa4444?

@RitikaPahwa4444
Copy link
Collaborator Author

Hi @rohit9625, I experienced it while working on my GSoC task last year. Is the default camera app on your device able to access location? And is the app able to retrieve that later? This issue is device dependent.

@rohit9625
Copy link
Contributor

Yes, on my device the in-app camera able to access location when it is turned on and app is able to retrieve that location in Upload Wizard.
I am using Samsung A14 with API 34.

@RitikaPahwa4444
Copy link
Collaborator Author

By default camera app, I mean the camera app you have on your Samsung handset that you've set to be used by other applications. We use an intent to trigger the default camera application to send the captured image to us.

@rohit9625
Copy link
Contributor

Yes I am also talking about the default camera app which is used by commons.

@RitikaPahwa4444
Copy link
Collaborator Author

Could you please check with the Commons app closed once? Just capture an image and check the coordinates in your gallery. If the coordinates exist, then your camera is recording them. You may try blocking the access to location for that camera app to reproduce this issue.

@rohit9625
Copy link
Contributor

The location is not available on the photo I clicked in both cases, i.e.,

  1. When location is allowed from settings
  2. When not allowed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants