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

Cannot add existing picture to marker #1620

Closed
khao-soi opened this issue Jun 27, 2023 · 9 comments · Fixed by #1621
Closed

Cannot add existing picture to marker #1620

khao-soi opened this issue Jun 27, 2023 · 9 comments · Fixed by #1621
Labels
potential bug A bug that could not (yet) be reproduced

Comments

@khao-soi
Copy link
Contributor

Describe the bug
When I use the regular android camera app to take a picture of something and try to add that picture to a marker, it says "cancelled, no photo marker added". I also tried to add the picture via the internal photo function and the galery preview of the camera view, but I can only see the picture there but can't apply it as the markers image.

Or am I doing something wrong? What is a photo marker and how does it differ to a regular marker?

To Reproduce

  1. Take a picture of anything
  2. Have a track with a marker
  3. Go to that marker
  4. Click edit icon (pen)
  5. Click add image icon (not take photo icon)
  6. See error "cancelled, no photo marker added"

If applicable:
2023-06-27-132548_002

Technical information

  • Device: OnePlus 8T
  • OS: LineageOS 20.0
  • OpenTracks version: 4.5.0 (F-Droid)
@khao-soi khao-soi added the potential bug A bug that could not (yet) be reproduced label Jun 27, 2023
@dennisguse
Copy link
Member

Do you press the button in the camera that you want the picture that was just taken?
What seems to happen is that the camera app reports that no picture was taken and therefore none will be transferred to OpenTracks.

Can you create a video of what is happening?

@khao-soi
Copy link
Contributor Author

khao-soi commented Jun 27, 2023

I pressed the preview button in the camera with the picture just taken, yes. But that was just my attempt to workaround the not functioning "add image" button.

As you can see from 0:17 on there is no way to take that photo. All I can do is go back. Before (at 0:10) you can see the error when clicking on that add image button, which is the actual problem.

Here's a video:

- removed -

@dennisguse
Copy link
Member

dennisguse commented Jun 27, 2023

Mhh okay.
Not sure what happens; actually a gallery activity should be opening.
I mean the first case should be working and the 2nd cannot (only allows taking new pictures).

Relevant code is in MarkerEditActivity; look for all three cases of R.string.marker_add_photo_canceled.

Any chance to get a logcat?

@dennisguse
Copy link
Member

Or might be related to Android 13s permissions.
Drjacky/ImagePicker#73

@dennisguse
Copy link
Member

@khao-soi can you try: #1621

@khao-soi
Copy link
Contributor Author

khao-soi commented Jun 27, 2023

Heres some logcat. One filtered by PID and one unfiltered.

logcat_opentracks.txt
logcat.txt

@khao-soi
Copy link
Contributor Author

@khao-soi can you try: #1621

Yeah I could. Give me some time to set up OpenTracks in my local dev env.

@khao-soi
Copy link
Contributor Author

khao-soi commented Jun 27, 2023

@khao-soi can you try: #1621

Android Studio doens't want to start it.

The project is using an incompatible version (AGP 8.1.0-rc01) of the Android Gradle plugin. Latest supported version is AGP 8.0.2

Edit: Downgrade to 8.0.2 seems to work.

@dennisguse
Copy link
Member

@khao-soi We currently use the RC of AndroidStudio (due to a nice feature in AGP 8.1.0).
Hope the stable release comes soon :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
potential bug A bug that could not (yet) be reproduced
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants