MediaStore.Images.Media.LATITUDE and MediaStore.Images.Media.LONGITUDE was deprecated in Android Q.
Does anyway know how we can get the Media location on React Native with expo? Basically do the below without Ejecting. Android 10: fetch the gallery via MediaStore with location information
Thank you
import * as Permissions from 'expo-permissions';
import * as MediaLibrary from 'expo-media-library';
import Exif from 'react-native-exif'
...
MediaLibrary.getAssetInfoAsync(asset).then(function (e) {
console.log("Location is ", e.location); //always null
if (e.location) {
data.push(e);
}
});
Exif.getLatLong(asset) //doesn't get location.
.then((loc) => { console.log('Location OK: ', loc) })
.catch(msg => console.log('messages: ' + msg))