Summary
A user asked for image capture and upload directly from the app. On iOS, the native file picker appears to handle this by offering camera capture for image inputs. On Android, the current Maple implementation may not reliably offer direct camera capture because image upload uses a standard hidden HTML file input and does not explicitly wire Android camera capture.
Current implementation
Image upload is implemented in frontend/src/components/UnifiedChat.tsx with a hidden file input:
<input
type="file"
ref={fileInputRef}
accept="image/jpeg,image/jpg,image/png,image/webp"
multiple
onChange={handleAddImages}
className="hidden"
/>
The upload action calls fileInputRef.current?.click() from the Add Images menu item.
Findings
- iOS has
NSCameraUsageDescription and WKWebView/native controls likely offer Take Photo automatically for image file inputs.
- Android has
android.permission.CAMERA in the manifest, but there is no explicit Android camera integration.
- No
capture attribute is set on the file input.
- No Android
ACTION_IMAGE_CAPTURE, custom onShowFileChooser, or native image picker integration was found.
- Current Android behavior likely depends on Android WebView/Tauri default file chooser behavior, which may vary by device.
Desired behavior
On Android, tapping Add Images should reliably offer a direct way to take a new photo and attach it, not only choose an existing image from files/photos.
Potential approaches
- Test current behavior on Android devices and document what the picker offers.
- Consider adding a dedicated Take Photo path for mobile Android.
- Consider whether adding
capture is appropriate, or whether a native camera/image picker integration gives a better UX while preserving the existing gallery/file upload flow.
Summary
A user asked for image capture and upload directly from the app. On iOS, the native file picker appears to handle this by offering camera capture for image inputs. On Android, the current Maple implementation may not reliably offer direct camera capture because image upload uses a standard hidden HTML file input and does not explicitly wire Android camera capture.
Current implementation
Image upload is implemented in
frontend/src/components/UnifiedChat.tsxwith a hidden file input:The upload action calls
fileInputRef.current?.click()from the Add Images menu item.Findings
NSCameraUsageDescriptionand WKWebView/native controls likely offer Take Photo automatically for image file inputs.android.permission.CAMERAin the manifest, but there is no explicit Android camera integration.captureattribute is set on the file input.ACTION_IMAGE_CAPTURE, customonShowFileChooser, or native image picker integration was found.Desired behavior
On Android, tapping Add Images should reliably offer a direct way to take a new photo and attach it, not only choose an existing image from files/photos.
Potential approaches
captureis appropriate, or whether a native camera/image picker integration gives a better UX while preserving the existing gallery/file upload flow.