Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16750

How can I send images/video and voice messages in React-native-Gifted-chat using render actions?

$
0
0

I want to send images/video in chat application, developed using React-native-gifted-chat and Firebase, How can I create action for them and call that actions to upload in firebase and send images/video?

Here is my code.

handleSendImage = () => {    console.log("handleSendImage");  };  renderActions(props) {    return (<Actions        {...props}        // containerStyle={{        //   width: 70,        // }}        icon={() => (<Icon            name={"camera"}            size={30}            color={colors.btnBg}            font={"FontAwesome"}            onPress={this.handleSendImage}          />        )}        onSend={(args) => console.log(args)}      />    );  }<GiftedChat            placeholder={"Hey!"}            alwaysShowSend            messages={messages}            onSend={(newMessage) => this.onSend(this.chatID(), newMessage)}            renderInputToolbar={this.renderInputToolbar}            renderActions={this.renderActions}            user={{              _id: senderId,              name: senderName,            }}          />

How can I click on particular actions and send voice and images/video respectively?


Viewing all articles
Browse latest Browse all 16750

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>