feat: consistent file input behavior on android
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
Empieza rastreando el manejo de Android para y cómo se interpretan accept y capture; después revisa la entrada queries requerida en AndroidManifest.xml. Compara el comportamiento actual del selector con Chrome en Android y Capacitor en iOS. Se considera terminado cuando funciona el comportamiento solicitado de la cámara, el explorador de archivos o el selector de aplicaciones, y el requisito del manifiesto de Android está documentado.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Feature Request
Description
When using <input type="file"> on Android, allow the user to choose what app to use (e.g. Camera or Files), unless the behavior is restricted by accept or capture attributes.
Current behavior on Android with Capacitor seems to be:
- If
captureattribute is present, andIMAGE_CAPTUREaction is defined inAndroidManifest.xmlthen open the camera, - Otherwise open the file browser
This differs from the behavior in Chrome for Android or Capacitor on iOS, both of which let the user choose between multiple apps when the capture attribute isn't set.
Platform(s)
- Android
Preferred Solution
Show an app chooser an Android depending on the accept and capture properties:
- If
captureattribute is present, then directly open camera - If
acceptattribute is used to only include types that aren't images, then directly open file browser - Otherwise show an app chooser, which should include at least Camera and File options

Also document that on Android it's necessary to add the following code to AndroidManifest.xml in order to show the camera from a file input:
<queries>
<!-- So camera can be opened from `<input type="file" capture>` -->
<intent>
<action android:name="android.media.action.IMAGE_CAPTURE" />
</intent>
</queries>
Alternatives
Document the differences in behavior between Android and web/iOS, as well as a suggested workaround (e,g, implementing a custom action sheet or popover with options for Camera and Files).
Additional Context
- Lenguaje dominante
- TypeScript
- Estrellas
- 17.1k
- Forks
- 1.3k
- Merge medio
- 1 d 22 h
- PR fusionados (30 d)
- 26
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de ionic-team/capacitor
-
triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
ionic-team/capacitor#8759 ·
Los mantenedores suelen responder en 1 día
-
[Bug]: Plugin call after navigation can be answered before reply proxy is updatedPosiblemente ocupada @MateStrysewske la tomó hace 71 días. Abiertotriage
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
ionic-team/capacitor#8616 ·
Los mantenedores suelen responder en 1 día
-
help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
ionic-team/capacitor#8574 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
SystemBars: safe area CSS injection throws "Cannot read properties of null" on startup (Android 16)Posiblemente ocupada @kttalley la tomó hace 62 días. Abiertotriage
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
ionic-team/capacitor#8530 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
fix(android): remove unchecked Java compilation warningsPosiblemente ocupada @Ajamuar la tomó hace 15 días. Abiertotriage
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
ionic-team/capacitor#8529 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de ionic-team/capacitor
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
prio:low scope:world
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
OliverRomhagen/vrigstad-joyride#849 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
genfeedai/genfeed.ai#11916 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
erkamyaman/rust-anything#1153 ·
Los mantenedores suelen responder en 1 día
-
The Phase 5 report says 0.3.0 waits for the live checkPosiblemente ocupada @fzn0x la tomó hoy. Abiertodocumentation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día