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

_onImageChange Not Working/Being Recognised #45

Open
razasekha opened this issue Apr 11, 2024 · 0 comments
Open

_onImageChange Not Working/Being Recognised #45

razasekha opened this issue Apr 11, 2024 · 0 comments

Comments

@razasekha
Copy link

I am running React-Native 0.73 and am trying to use the image keyboard in my app. I have just been testing on Android for now.

Since installing the library and importing the react-native-image-keyboard, I can browse gifs and stickers, but when I click on one, nothing happens. I have added logs, none of which are being activated. I have tried an exact copy of the android example and that had the same issue.

index.js

import 'react-native-image-keyboard';
import {AppRegistry} from 'react-native';
import App from './App';
import {name as appName} from './app.json';
import messaging from '@react-native-firebase/messaging';



// Register background handler
messaging().setBackgroundMessageHandler(async remoteMessage => {
    console.log('Message handled in the background!', remoteMessage);
  });

AppRegistry.registerComponent(appName, () => App);

And in My screen:

import {TextInput} from 'react-native';
  const [newMessage, setNewMessage] = useState(''); // Text for a new message

  const _onImageChange = event => {
    console.log('Test')
    const {uri, linkUri, mime, data} = event.nativeEvent;
    console.log('Yay, image received!', uri, linkUri, mime, data);

    // Do something with this data
  };

            <TextInput
              onImageChange={_onImageChange}
              style={styles.messageInput}
              value={newMessage}
              onChangeText={setNewMessage}
              placeholder="Type a message..."
              placeholderTextColor={'white'}
            />

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

No branches or pull requests

1 participant