0

I am building an upload service that works on both 3G and WiFi, and I want to automatically kill the HTTPURLConnection and resume the upload if the user connects to WiFi. Is there a way to check the connectivity option that is being used by an HTTP connection or do I have to keep track of the network connectivity when I first made the connection?

JustinHK
  • 758
  • 1
  • 6
  • 19
  • This might be helpful: http://stackoverflow.com/questions/4086159/checking-internet-connection-on-android/36326022#36326022 – Rohit Arya Apr 22 '16 at 20:25
  • I am already using a network checker; in this case the behavior seems to be that new connections will use the WiFi but an open one will (by its nature) stay on the 3G connection. I could be wrong, though, and it could just be that there is one network per application context? – JustinHK Apr 22 '16 at 20:59

0 Answers0