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

[Issue][Android] - can't loaded image from camera #26

Open
WangShayne opened this issue Oct 17, 2023 · 5 comments
Open

[Issue][Android] - can't loaded image from camera #26

WangShayne opened this issue Oct 17, 2023 · 5 comments

Comments

@WangShayne
Copy link

Opening a photo from the camera always shows the loading icon, but online images work just fine;

image info
image

d5c680b0c3261e18d09b4b13b84ce31f.-.Trim.mp4
@WangShayne
Copy link
Author

If the utility static array can be loaded correctly, but the utility useState updates the array, the pictures added later cannot be displayed and keep loading.

@llr101
Copy link
Collaborator

llr101 commented Oct 18, 2023

Could you show me your codes ?

@WangShayne
Copy link
Author

sorry i remove the codes.
ex:

const [images,setImages]=useState([])

const takePhoto = () => {
    //get a image file uri
    setImages(images => [...images, {uri: image.uri}])
}

@llr101
Copy link
Collaborator

llr101 commented Oct 18, 2023

Could you try this:

const [images,setImages]=useState([])

const takePhoto = () => {
    //get a image file uri
    setImages(images => [...images, image])
}

@WangShayne
Copy link
Author

Could you try this:

const [images,setImages]=useState([])

const takePhoto = () => {
    //get a image file uri
    setImages(images => [...images, image])
}

same result

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

2 participants