Skip to content

Cannot use file input to capture image #88

@jbennett

Description

@jbennett

I'm using <input type="file" accepts="image/*" capture /> which works perfectly on web and iOS, and for the photo gallery on Android, but for camera captures on Android it looks like Hotwire is restarting my MainActivity and I'm loosing state, almost like the page is reloading. Additionally, this works fine on an emulator, just not on device.

For debugging purposes I've tried this on a new project, just adding camera and file writing permissions to the manifest with the same results.

Any suggestions?

Edit: Added a minimal sample repo that demonstrates the issue: https://github.com/jbennett/hotwire-native-file-input

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions