Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to input GIFs from Google Keyboard #1318

Closed
reidkersey opened this issue Jul 16, 2019 · 7 comments
Closed

Unable to input GIFs from Google Keyboard #1318

reidkersey opened this issue Jul 16, 2019 · 7 comments
Labels

Comments

@reidkersey
Copy link

reidkersey commented Jul 16, 2019

Issue Description

When user tries to insert a GIF, they get the message 'app_name doesn't support image insertion here'

Steps to Reproduce / Code Snippets

Gifted chat example with no other modifications, running on android with Google Keyboard. Use the keyboard to attempt to insert a GIF.

Expected Results

Developer should have some way to receive the selected GIF, and chose to deal with it how they deal with pictures etc. (or just have the GIF pop into the message box like Google Messager)

Additional Information

  • Nodejs version: 11.8.0
  • React version: 16.8.3
  • React Native version: 0.59.9
  • react-native-gifted-chat version: 0.9.11
  • Platform(s) (iOS, Android, or both?): Android, iOS untested
  • TypeScript version: 3.5.3
@oromis300
Copy link

Hi, same here. We want to integrate the possibility to send gif via the keyboard.
Do you have any idea how we can do that?

@stale
Copy link

stale bot commented Oct 1, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Oct 1, 2019
@stale stale bot closed this as completed Oct 8, 2019
@ede-sous
Copy link

Hello,

I have the same issue.
Did you found any solution for this?

@ThemNumbers
Copy link

You need to add listener for ForegroundSharing, i solve this problem

@bakerac4
Copy link

@ThemNumbers could you expand on your solution?

@filipef101
Copy link

@ThemNumbers What is that?

@brkastner
Copy link

I was able to get this working by doing the following:

  1. Enable support for rendering gifs in native android project (rn docs)
  2. Install react-native-image-keyboard (based on an open pr)
  3. Create a callback to extract the local uri for the selected gif:
type OnImageChangeCallback = (event: { nativeEvent: { uri: string } }) => void;
const onImageChange: OnImageChangeCallback = ({nativeEvent}) => {
    const {uri} = nativeEvent;
    // upload gif using local uri to somewhere publicly accessible (eg. firebase storage)
    // send a new message with message.image = <publicDownloadUrl>
}
  1. Override composer using renderComposer to connect the callback
const renderComposer = props => <Composer {...props} textInputProps={{onImageChange}} />;
return <GiftedChat renderComposer={renderComposer} />
  1. Send some gifs!
    tenor_gif186717120405782897

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants