React navigation EventListener not working - react-native

I am having a problem with react navigation event listeners not firing, specificly "gestureEnd" is not running the function when the gestureEnds on iphone (swipping left to right to go to a page back)
image problem
i know there is too many console logs but am trying to see where it stops and if its running or not but it runs all the console logs beside the ones inside the listener

Related

Navigating back from react native page to native: how?

I'm working on a native app that I want to display some pages in using React Native. I'm using react-navigation to handle a stack, and launching that in an Android activity (built according to the documentation for integrating React Native code into native apps) and from the similar instructions for iOS.
Once I enter the stack, I can navigate around it just fine - back navigation works with both an on-screen button calling navigation.goBack()/navigation.pop() and the Android hardware back button. The problem comes when I reach the top of the RN stack - I'd expect another attempt to pop from the stack or another press of the hardware back button to exit the app, but it doesn't; instead nothing happens when pressing the back button, and the on-screen button gives an error like:
The action 'GO_BACK' was not handled by any navigator.
and doesn't do anything.
How can I make back navigation from the top level of my React Native content seamlessly return me to the native app on both iOS and Android?

Accessibility issues in the react-native app

I am working on the accessibility in the react-native and what issue i m facing is that when the app is run using keyboard, then all the touchable components are focused using tab navigation but they are not getting clicked when any keyboard key like enter is pressed
I tried some of the tips given in the "https://facebook.github.io/react-native/docs/accessibility.html" but it is still not working.

Why React native navigation loads all components at the same time?

I am using react native navigation v2 by wix. I have a welcome screen with login screen and register. I start the startAuth.js from App.js. There are two tabs with login and register.
But as soon as app starts the componentWillMount methods runs in the register screen but yet i am at login tab.
Why is this happening?
react-native-navigation's Tab does not support lazy loading. But there are two special lifecyle functions where you can put your logic when component appear or disappear on screen
componentDidAppear(): called each time this component appears on screen
componentDidDisappear(): called each time this component disappears from screen
https://wix.github.io/react-native-navigation/docs/screen-lifecycle
There is also a discussion about topic https://github.com/wix/react-native-navigation/issues/1250

need the react native app to receive headset button event when the device is in locked state

How to run react native app in background. I need the app to accept the voice command when i click the headset button even when the device is in locked state.
Basically headset button click event should trigger the app to listen for voice. Currently my app accepting the voice command in foreground mode and works. but my requirement is even if device is locked , up on clicking the head set button i should trigger the app.
It wasn't done before but today you can by adding some libraries to create a background service. I believe you can later capture the event you want. this what you will tell us.
Follow this link to learn how to create the background service
Libraries you will need:
React Native Queue
react-native-background-task

react native event when first opened

I am trying to get the correct event for the first start up in a react native app.
I understand AppState and can get these statuses from the React Native Docs
App States
active - The app is running in the foreground
background - The app is running in the background. The user is either
in another app or on the home screen
inactive - This is a state that occurs when transitioning between
foreground & background, and during periods of inactivity such as
entering the Multitasking view or in the event of an incoming call
In the docs it mentions that when the app first loads AppState.currentState will be null, but I can find when that would happen.
Why do I even care you ask, I am trying to send a "login" event, but I don't want it every time the app becomes active. If it is relevant I am working on a cross platform app, both Android and IOS need to be supported.