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

Unable to save video when locked #381

Closed
hephaisto opened this issue Sep 30, 2023 · 11 comments
Closed

Unable to save video when locked #381

hephaisto opened this issue Sep 30, 2023 · 11 comments

Comments

@hephaisto
Copy link

hephaisto commented Sep 30, 2023

When my device is locked, I can double-press the power button to get to the camera and switch to video. I can start and stop video and it is saved properly on the device. However, when I instead start recording the video and press the power button again to switch off the screen, I get "Unable to save this video: Error code 4" when I switch it back on. The complete video is lost, even the part before pressing the power button.

Device: Pixel 4

See also: https://discuss.grapheneos.org/d/7728-unable-to-save-video-when-locked

@thestinger thestinger transferred this issue from GrapheneOS/os-issue-tracker Sep 30, 2023
@hephaisto
Copy link
Author

hephaisto commented Dec 27, 2023

The issue still persists on
app.grapheneos.camera 64
TP1A.221005.002.B2.2023122200

Just the error message has changed to the new text.

@empratyush empratyush reopened this Dec 27, 2023
@empratyush
Copy link
Member

@hephaisto on pixel 4 ?

@hephaisto
Copy link
Author

@hephaisto on pixel 4 ?

yes.

@hephaisto
Copy link
Author

I have to make a few corrections/additions: Now a video is saved. However, recording is stopped without pressing the record-button. This is the sequence of events and the content of the resulting video file:

  • Double-press power to switch on camera
  • Press record
  • Stuff here is recorded normally
  • Press power button
    • screen off
  • Stuff here is recorded normally
  • ~6s pass
  • Video file ends
  • more time passes
  • Press power button
    • screen on
    • Error message shows

So now at least the video until the power button press is saved, which definitely is an improvement over the previous state. A least the first video is not totally lost. Thanks for that fix so far! However, the video recording still aborts when switching off the screen.

I'm not sure if the OS itself is messing with the camera in this situation. If it is impossible for the camera app to keep access to the hardware, the current behavior is probably a "won't fix" for the camera app, and could only be changed in the OS. If that is the case, I'd accept the current state as "solved" and I'll probably file a report there.

@empratyush
Copy link
Member

This is the expected behaviour camera can only be used while the app is in the foreground.

@thestinger thestinger closed this as not planned Won't fix, can't repro, duplicate, stale Dec 28, 2023
@thestinger
Copy link
Member

Background recording support via a foreground service would be a new feature. This issue report was closed because it wasn't requesting background recording support but rather was reporting the expected behavior of a normal camera app which stops recording when you switch away from it. That's how the Camera permission works, since it only allows access while in use. Recording without the app being in the foreground requires a foreground service and would be a significantly different way of doing things which shouldn't ever be the default.

@hephaisto
Copy link
Author

hephaisto commented Aug 14, 2024

@thestinger Yes and no. I reported a state A which was buggy. This was changed to state B, which was not buggy but suboptimal to me. It's okay that it doesn't get changed to C. But B is still an improvement over A.
The original report wasn't about the app being stopped per se, but being terminated in a way which lost all the data.
So this is actually resolved, not "won't fix". At least per the original bug description.

@thestinger
Copy link
Member

Well, it does save the data now, but we don't have background recording as an option. Can close it as complete then.

@anonfaded
Copy link

well you can use other camera apps that are specifically made with a foreground recording feature.

@thestinger
Copy link
Member

It's a feature which could be implemented in this app but it's a separate request from what was requested here.

@anonfaded
Copy link

It's a feature which could be implemented in this app but it's a separate request from what was requested here.

Yeah but he can use other alternatives until its officially added to the main camera app, anyways the chat here is very old and he probably isn't even seeing the latest replies.

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

No branches or pull requests

4 participants