[SOLVED] Doubt about offline testing environment

Hi,

I am integrating in my React Native app the feature of adding in a queue the requests to the server that are made when there is no Internet connection.

I detect correctly when there is connection and when not, using the NetInfo component. I save the result in the store with a Redux Persist action/reducer. And, depending on the result, I show, or not, the offline notification. All right.

But when I unplug the Wi-Fi, with or without mobile data, actions I dispatch are not executed. Is it normal in development mode since it must be in the same network?; or, ¿once the app is launched, should the disconnections of the network not affect its operation?

Open my mind, please. I’m trapped.

Regards bro,

Debug your app in offline mode with Expo CLI (Android):

  1. Run apps on a hardware device https://developer.android.com/studio/run/device
  2. Configure on-device developer options https://developer.android.com/studio/debug/dev-options?hl=en-419
  3. Run Expo CLI
  4. Select Local connection
  5. Run on Android device/emulator
  6. Turn off WiFi & mobile data
  7. Voilà…!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.