[GH-ISSUE #6953] [Issue]: The Android app never offers the camera when picking a picture #3897

Closed
opened 2026-10-21 06:08:33 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @SpicyMarinara on GitHub (Oct 1, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6953

Originally assigned to: @SpicyMarinara on GitHub.

Summary

In the Marinara Android app, picking a picture never offers the camera, whether in Noodle posts or chat attachments. You can only choose an existing file.

Found while fixing #6939. That fix makes Chrome on Android offer Camera for Noodle's picture buttons, but the app's WebView doesn't use Chrome's chooser, so it doesn't help there.

Expected behavior

When a page asks for an image, the app should offer Camera next to the file chooser, like Chrome does.

Actual behavior

MainActivity.java onShowFileChooser builds its own file intent and never adds a camera option.

Where to fix it

In android/app/src/main/java/com/marinara/engine/MainActivity.java, onShowFileChooser:

  • When the accepted types include images, add an ACTION_IMAGE_CAPTURE intent to the chooser.
  • Save the photo through a FileProvider URI.
  • Return that URI in onActivityResult when the camera was used.

If the app ever declares the CAMERA permission, it must also ask for it before using ACTION_IMAGE_CAPTURE.

Steps to reproduce

  1. Open Marinara in the Android app.
  2. In Noodle, start a post and tap the picture button. Or attach an image in a chat.
  3. Only the file chooser opens; there's no Camera option.

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @SpicyMarinara on GitHub (Oct 1, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6953 Originally assigned to: @SpicyMarinara on GitHub. ## Summary In the Marinara Android app, picking a picture never offers the camera, whether in Noodle posts or chat attachments. You can only choose an existing file. Found while fixing #6939. That fix makes Chrome on Android offer **Camera** for Noodle's picture buttons, but the app's WebView doesn't use Chrome's chooser, so it doesn't help there. ## Expected behavior When a page asks for an image, the app should offer **Camera** next to the file chooser, like Chrome does. ## Actual behavior `MainActivity.java` `onShowFileChooser` builds its own file intent and never adds a camera option. ## Where to fix it In `android/app/src/main/java/com/marinara/engine/MainActivity.java`, `onShowFileChooser`: - When the accepted types include images, add an `ACTION_IMAGE_CAPTURE` intent to the chooser. - Save the photo through a `FileProvider` URI. - Return that URI in `onActivityResult` when the camera was used. If the app ever declares the `CAMERA` permission, it must also ask for it before using `ACTION_IMAGE_CAPTURE`. ## Steps to reproduce 1. Open Marinara in the Android app. 2. In Noodle, start a post and tap the picture button. Or attach an image in a chat. 3. Only the file chooser opens; there's no Camera option. ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#3897
No description provided.