I am using this code in the react native for appState and i am permforming some actions on this
AppState.addEventListener('change', handleAppStateChange);
return () => {
AppState.removeEventListener('change', handleAppStateChange);
setRow(false)
}
This code is working as expected. But when i am doing lock my phone manually this event also fires that i don't want. So how can i restrict this code. That it will work in background mode as it. But do not work in the device lock function. On device lock manually by button click i can perform some other action.