CameraRoll React-native

0

I need to create a script that returns and lists the images found in the user's mobile gallery. For this, I'm using the getPhotos method of the CameraRoll component of React-native

  

link

In both IOS and Android, the array of images are returned correctly. but when I try to use the uri of the image (using the Image component), in IOS it is displayed, but in android not.

Return of images in IOS ( result.edges.node.image.uri ):

ImagesreturnonAndroid(result.edges.node.image.uri):

Imagecallingcode:

<ImageresizeMode="cover" style={[ styles.image_item ]} source={{ uri: image.node.image.uri }} />

React / Expo garments used:

    
asked by anonymous 11.10.2018 / 19:44

1 answer

0

Is not the error in your styles ? I saw that you passed an array as a value of prop, if I'm not mistaken the correct value is an object.

I think that by removing this, there is no other mistake. Your code is pretty much the same as mine.

      <Image
        source={{
          uri: this.state.displayImg.uri,
        }}
        style={{
          width: 40,
          height: 40,
          borderRadius: 8,
        }}
      />
    
11.10.2018 / 19:51