react-native-background-upload icon indicating copy to clipboard operation
react-native-background-upload copied to clipboard

[Enhancement] Switch Upload from Cellular to WiFi when a WiFi network is joined during an upload

Open pedrosimao opened this issue 6 years ago • 2 comments

I have noticed that if an upload starts via 4G or 3G connection and the user connects to a WiFi during the upload, the upload won't switch to Wifi (which would be normally faster and cheaper). But it stays on cell network till the end. It would be great to create a listener for cell network to wifi network changes, so upload could switch network or even restart.

pedrosimao avatar Jan 24 '19 15:01 pedrosimao

@TSMMark thanks for your support. If you have any idea on how it can be done I can try to code it myself.

pedrosimao avatar Jan 29 '19 10:01 pedrosimao

I imagine it would have to be implemented for iOS and Android both separately because of the nature of background processes. Looking into it more I'm not sure it would even be possible without canceling and retry an upload once the device has switched networks, and it sounds like it would require foregrounding the app. https://forums.developer.apple.com/thread/25758

Sorry I can't be of more help. Your best bet might be allowing the user to cancel and retry within your application

TSMMark avatar Jan 29 '19 14:01 TSMMark