seniv / react-native-notifier

Fast and simple in-app notifications for React Native
MIT License
1.05k stars 60 forks source link

[Android] SwipeEnabled not working and onPress not triggered on first press #53

Closed KrifaYounes closed 2 years ago

KrifaYounes commented 2 years ago
    Notifier.showNotification({
            title: 'John Doe',
            description: 'Hello! Can you help me with notifications?',
            duration: 0,
            showAnimationDuration: 350,
            hideOnPress: true,
            swipeEnabled: true,
            onPress: onPress,
        });
"react-native": "0.65.1",
"react-native-notifier": "^1.7.1",
"react-native-gesture-handler": "^1.10.3",
"@react-navigation/bottom-tabs": "^6.0.7",
"@react-navigation/drawer": "^6.1.6",
"@react-navigation/material-top-tabs": "^6.0.4",
"@react-navigation/native": "^6.0.4",
"@react-navigation/stack": "^6.0.9",
anatooly commented 2 years ago

As for me iOS app crash when I click notification :-(

KrifaYounes commented 2 years ago

it's working. I missed configure react native gesture handler

siiiiilvio commented 1 year ago

If this happens to you, make sure that you are wrapping your application with the GestureHandlerRootView

import { GestureHandlerRootView } from 'react-native-gesture-handler'; <GestureHandlerRootView><YourApp /></GestureHandlerRootView>