React-native task background in android

106 Views Asked by At

When I working with my app with React-Native and my emulator is Android API 33 , I have a issue with a task-background. More specifically when i working with task a tracking location, I really used 2 lib to doing this task are: react-native-geolocation and react-native-background-timer. I have a issue, when my app running in a background, It only can doing task about 10 to 15 minutes and my app was killed, when I go back from background to a App, it re-open.

And it show me a error: Caused by: java.lang.IllegalStateException: Screen fragments should never be restored. Follow instructions from https://github.com/software-mansion/react-native-screens/issues/17#issuecomment-424704067 to properly configure your main activity.

I researched with a dontkillmyapp on (https://dontkillmyapp.com/?fbclid=IwAR09M8q7bP4Aspc5wIsLtL6jWDhiHPUkM7Vb3ZiB0rpxE5_3IkHRbemyhps) So after I doing follow them , I cannot solve my problem. Please help me! Thanks for watching...

0

There are 0 best solutions below