OpenTracksApp / OpenTracks

OpenTracks is a sport tracking application that completely respects your privacy.
https://OpenTracksApp.com
Apache License 2.0
1.06k stars 190 forks source link

Gesture navigation: Hold to stop not working #1893

Open mroethke opened 6 months ago

mroethke commented 6 months ago

Describe the bug I can't stop a recording because hold to stop is not working. If I just tap it the message "Hold to stop" is displayed. In some rare situations it does work, but i cant reproduce that. I usually help myself by stopping the app in settings but, that is hardly a solution.

To Reproduce

  1. Start recording
  2. Hold touch on stop button
  3. Recording does not stop

Technical information

dennisguse commented 6 months ago

Just keep the button pressed ;)

mroethke commented 6 months ago

thank you for your suggenstion, but I tried that. It does not work no matter how long i press.

dennisguse commented 6 months ago

Can you upload a video?

mroethke commented 6 months ago

sure itdoesnotwork.webm

dennisguse commented 6 months ago

Interesting :) Some wild guessing: can you try it with 3-button navigation? And also check that you are not touching the gesture bar directly below?

It is one of the those "works for me" situations :sunglasses:

mroethke commented 6 months ago

It works with 2 and 3 button navigation so it is probably androids fault. I'm pretty sure that it worked flawlessly at some point with gesture navigation though, since I have been using it for years. However, by aiming for the upper left quarter of the button I can somewhat reliably stop the recording. That is not great, but at least it is something. (I really really like gesture navigation and don't want to switch back)

I have two ideas on how to make this better:

  1. Can you change the color of the button when it registers the touch event? this way it would at least be clear to me that the app does or does not register an event.
  2. Could the button be moved a bit towards the center of the screen to make the area were it registers the touch event larger?

I realize that the second one would probably not be very popular since it would waste some screen space for a problem that apparently not many people have. And it is just a workaround for something I would consider to be an android bug. I do wonder if using this API would change anything tough, if it is not already used.

dennisguse commented 6 months ago

Finally, I got to use it: "You are holding it wrong!" 🥳 So, now I can strike this from my bucket list.

Anyhow, can you try to solve this on your own? I am kind of busy with other side projects at the moment and nothing would happen here soonish.

dennisguse commented 6 months ago

PS sounds like this would help: https://developer.android.com/reference/android/view/WindowInsets.Type#mandatorySystemGestures()

mroethke commented 6 months ago

I'm sorry, but I did not mean to imply that I would work on it. I can see why you assumed that, but it really was not my intention. I unfortunately have zero experience with android app development :/

dennisguse commented 6 months ago

@mroethke no worries about this! My biggest problem is that I cannot reproduce the problem easily on my Fairphone 4. Eventually, this will be fixed :D