react-native-toast-notifications icon indicating copy to clipboard operation
react-native-toast-notifications copied to clipboard

In Android 12 the onPress is not working

Open ashirkhan94 opened this issue 2 years ago • 1 comments

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

ashirkhan94 avatar Sep 07 '22 06:09 ashirkhan94

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?

martinpoulsen avatar Sep 07 '22 12:09 martinpoulsen

Hi, Any update

ashirkhan94 avatar Nov 21 '22 10:11 ashirkhan94

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

alyosha avatar Apr 12 '23 05:04 alyosha

@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

alyosha avatar Apr 12 '23 06:04 alyosha

hi team It is working now Thanks

ashirkhan94 avatar Nov 15 '23 12:11 ashirkhan94