React-native: Accessing video files from CameraRoll on Android

Created on 30 Jun 2016  路  2Comments  路  Source: facebook/react-native

Is it possible to retrieve video files from cameraRoll on Android?. I see there is a groupTypes prop but it is not working for Android. I already asked a question on stackoverflow; but I couldn't get any answer. http://stackoverflow.com/questions/38104131/react-native-using-cameraroll

I tried setting the mimeTypes in fetch params as follows: mimeTypes: ["image/jpeg", "video/mp4", "video/mpeg"] but it didn't work out either.

Am I missing something, I would appreciate any help.

Thanks

Locked

Most helpful comment

Seems like android version only checks images table from sqlite. I extended the current cameraRoll to also retrieve videos, its a bit dirty solution but it solves the problem for now. Basically it checks Files table rather than Images table. Here is the gist for that: https://gist.github.com/cubbuk/70e0841ec5e0ebfe80c6f747eb973216

All 2 comments

Seems like android version only checks images table from sqlite. I extended the current cameraRoll to also retrieve videos, its a bit dirty solution but it solves the problem for now. Basically it checks Files table rather than Images table. Here is the gist for that: https://gist.github.com/cubbuk/70e0841ec5e0ebfe80c6f747eb973216

Hi there! This issue is being closed because it has been inactive for a while.

But don't worry, it will live on with ProductPains! Check out its new home: https://productpains.com/post/react-native/accessing-video-files-from-cameraroll-on-android

Product Pains has been very useful in highlighting the top bugs and feature requests:
https://productpains.com/product/react-native?tab=top

Also, if this issue is a bug, please consider sending a pull request with a fix.

Was this page helpful?
0 / 5 - 0 ratings