I’m trying to get access to media albums, and photos using Expo, this is the code I’m using
import { MediaLibrary, Permissions } from 'expo'
// I ask permissions
const { status } = await Permissions.askAsync(Permissions.CAMERA_ROLL)
this.setState({ permissionsGranted: status === 'granted' }, this.getAlbums)
// if permissions granted
const albumsReponse = await MediaLibrary.getAlbumsAsync()
if I try to console.log MediaLibrary, I get undefined, also I get this error:
versions: expo: 27.0.1 react: 16.2.0 react-native: 0.52.0