I have a React Native screen in which a ripple click starts a native Android activity, the android activity is a heavy one with DB reading and has a long recycler-view. There is delay in RN to start the native activity, hence there is a chance to tap the ripple component multiple time before starting the native activity which eventually leads to opening the native activity multiple times. I'm looking for a solution to prevent this.
I tried adding android:launchMode="singleTask"
for the activity in Manifest file, but still the multi tap from RN is triggering hence launches the activity right after closing.
I also tried this solution to disable multi tap from RN but the JS code execution is paused and the setTimeout
function is getting called after the delay as we are in the native activity.
So, my question is how can I prevent this particular issue of having multiple taps? I'm not so good in RN and JS. Thanks in advance.
I'm using this sample repo to start native activity from react native