How to set metadata correctly (how to retrieve it) react native camera

239 views Asked by At

I am not sure if I understand the docs properly. capture([options]): Promise allows to set metadata like location.

However, how do I set the metadata correctly?! That way?

_takePhoto() {
    const options = { location };
    this.camera.capture({ metadata: options })
        .then((data) => {
            console.log("photodata", data, data.path)
        })
        .catch(err => console.error(err))
}

And, how would I read the location information out again? When I log console.log("photo data", data, data.path) there is no location information in it.

0

There are 0 answers