Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all articles
Browse latest Browse all 29498

React Native + Redux background process

$
0
0

I have an application in react-native (android) where the redux store saves user login information, among other things, this app runs a background process of geologization and calls an api.

Context:

In development the app in the background works perfect, the problem is when I do the productive build. After a few hours in the background, the app "closes", not directly, but when you return to the app, it stays on a blank screen and starts again as if all the redux data was deleted, which would be normal if killed the process and reopens.

Test:

I have tried with community libraries to disable battery management, which does not limit the use of cpu, that the app is always active in the background but I cannot find a solution.

package.json

{
  "name": "VoysSender",
  "version": "1.0.0",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "start": "react-native start",
    "test": "jest",
    "lint": "eslint ."
  },
  "dependencies": {
    "@react-native-community/geolocation": "^2.0.2",
    "@unimodules/core": "^5.0.0",
    "axios": "^0.19.0",
    "expo": "^36.0.2",
    "expo-asset": "^8.0.0",
    "expo-constants": "^8.0.0",
    "expo-file-system": "^8.0.0",
    "expo-font": "^8.0.0",
    "expo-vector-icons": "^10.0.1",
    "geolib": "^3.2.1",
    "i": "^0.3.6",
    "npm": "^6.13.4",
    "react": "16.9.0",
    "react-native": "0.61.5",
    "react-native-background-timer": "^2.1.1",
    "react-native-elements": "^1.2.7",
    "react-native-fs": "^2.16.2",
    "react-native-gesture-handler": "^1.5.3",
    "react-native-keep-awake": "^4.0.0",
    "react-native-maps": "0.26.1",
    "react-native-maps-directions": "^1.7.3",
    "react-native-modalbox": "^2.0.0",
    "react-native-paper": "^3.4.0",
    "react-native-pose": "^0.9.1",
    "react-native-reanimated": "^1.4.0",
    "react-native-sketch-draw": "^2.0.2",
    "react-native-tab-view": "^2.11.0",
    "react-native-turn-off-optimization": "^1.0.3",
    "react-native-vector-icons": "^6.6.0",
    "react-navigation": "^4.0.10",
    "react-navigation-animated-switch": "^0.4.1",
    "react-navigation-drawer": "^2.3.3",
    "react-navigation-material-bottom-tabs": "^2.1.5",
    "react-navigation-stack": "^1.10.3",
    "react-navigation-tabs": "^2.6.2",
    "react-redux": "^7.1.3",
    "redux": "^4.0.5",
    "redux-thunk": "^2.3.0"
  },
  "devDependencies": {
    "@babel/core": "7.7.7",
    "@babel/runtime": "7.7.7",
    "@react-native-community/eslint-config": "0.0.5",
    "babel-jest": "24.9.0",
    "eslint": "6.8.0",
    "jest": "24.9.0",
    "metro-react-native-babel-preset": "0.56.3",
    "react-test-renderer": "16.9.0"
  },
  "jest": {
    "preset": "react-native"
  }
}```


Viewing all articles
Browse latest Browse all 29498

Trending Articles