react-native-toast-notifications
react-native-toast-notifications copied to clipboard
In Android 12 the onPress is not working
Current behaviour:-
Hi team in Android 12 the OnPress is not working, on Android 10 it is working fine
Expected behaviour:-
the onPress should work in android 12
Code sample:-
const chattoast = useToast(); chattoast.show(toastMessage, { type: "success", onClose: () => { console.log("CLOSE HANDLER") }, onPress: () => { chattoast.hideAll() console.log("Navigation HANDLER") chatNavigationHandler() }, style: { marginBottom: 100 }, duration: 5000, })
Environment
software | version |
---|---|
android | 12 |
react-native | 0.66.3 |
react-native-toast-notifications | 3.2.3 |
node | v14.17.5 |
npm or yarn | yarn |
I also experienced this issue, but I think it's related to specific phone models or manufacturers.
On a Google Pixel 3 @ Android 12 and Google Pixel 5 @ Android 13 it works fine. Also tried a Huawei and a Motorola where it worked fine.
On Samsung S8 @ Android 9 and Samsung S20 @ Android 12, onPress
is never called. Maybe it's only an issue on Samsung devices?
Hi, Any update
Same experience/understanding as @martinpoulsen -- so far I have only been able to reproduce with Samsung devices. His patch PR resolves the issue and seems supported by this issue as well
@ashirkhan94 could you maybe update the issue title in light of @martinpoulsen's comment? Seems not Android 12, but rather device (and probably Samsung) specific
hi team It is working now Thanks