6

I have an app that controls the Sony RX10 camera over WiFi. I need to offload the photos to the server after they're taken, and I feel like I read somewhere that this is possible, but now I can't find it anywhere... The problem is that the camera acts as a router, but it has no access to the Internet. So, the tablet/phone that's connected to it is attempting to transmit the media over that channel but what I need it to do is to use its 4G antenna instead and transmit that way.

Is it possible to force the device to connect to the server (HTTP) over the cellular network even when it's connected via WiFi to something that has no access to the Internet?

manlio
  • 18,345
  • 14
  • 76
  • 126
Yevgeny Simkin
  • 27,946
  • 39
  • 137
  • 236
  • What does offload mean? – fonZ Jun 27 '14 at 23:28
  • @fonZ, upload image via HTTP, or in general make an HTTP call to the server – Yevgeny Simkin Jun 27 '14 at 23:30
  • Alright, anyway you have to send over a socket. That socket connects to an ip address. Your wifi has an ip and your 4G has another ip. It's up to the one creating the socket to choose the ip correctly. – fonZ Jun 27 '14 at 23:31
  • 2
    See [this answer](http://stackoverflow.com/a/4756630/321697). `requestRouteToHost()` seems to be what you are looking for. – Kevin Coppock Jun 27 '14 at 23:55

1 Answers1

1

Definitely yes. You should use a C code. You should periodically enumerate network interfaces. You should bind a socket per IP address. I have an exaple for iOS, but I shure on Android all things work same. https://gist.github.com/avesus/fdb465b60a4f5204845c

Brian Cannard
  • 852
  • 9
  • 20