gpt4 book ai didi

reactjs - CameraRoll react native smartAlbum

转载 作者:行者123 更新时间:2023-12-02 16:09:02 25 4
gpt4 key购买 nike

可以使用相机胶卷获取照片,但通过智能相册过滤,例如:自拍、屏幕截图等..?我尝试这样做:

CameraRoll.getPhotos({ groupName: 'Favorites', groupTypes: 'Library', first: 36 })
.then((data) => {
const assets = data.edges;
const images = assets.map((asset) => {
console.log('Imagen', asset);
return asset.node.group_name;
});
console.log('CameraRoll images', data, images);
})
.catch(err => console.log('CameraRoll error', err));

但始终返回一个空数组。

最佳答案

这是不可能的,因为react-native使用ALAssetsLibrary,而我需要使用Photos框架,所以解决方案是集成react-native-photos-framework

https://github.com/olofd/react-native-photos-framework

关于reactjs - CameraRoll react native smartAlbum,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43551157/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com