SudoPlz / sp-react-native-in-app-updates

An in-app updater for the native version of your react-native app.
MIT License
491 stars 66 forks source link

Not getting any event on the click of no thanks button #22

Open irfan102 opened 3 years ago

irfan102 commented 3 years ago

I tried looking into the documentation and also in code but could not find an event that is produced when no thanks is clicked. Originally the cancel event should trigger but it is triggered on the click of cancel button that appears on the tray. Please guide as to how to get the event on no thanks.

irfan102 commented 3 years ago

@SudoPlz please can you please explain how to achieve this behaviour ?

SudoPlz commented 3 years ago

Hey @irfan102 apologies for the late response.

Not sure, I don't remember trying that out, but I feel that checkNeedsUpdate would throw on cancel (I'm not sure though). The reason I believe that is because we do have an addOnFailureListener listener here: https://github.com/SudoPlz/sp-react-native-in-app-updates/blob/master/android/src/main/java/com/sudoplz/rninappupdates/SpReactNativeInAppUpdatesModule.java#L95-L97

I have to investigate further though, apologies for not being very helpful but we have to dive into the official in-app-updates android documentation to figure out how this is done.

A PR would be most welcome if you feel like experimenting.

Thank you.

irfan102 commented 3 years ago

@SudoPlz sure, ill let you know how i figured it out.

shubhamdeol commented 3 years ago

@irfan102 does this library works for you? Please let me know how u make it work. I can't even see update popup