Android Phone is connected to the camera via Wi-Fi. Camera does not have Internet connection. Android Phone communicates with Camera through Wi-Fi. But I need to make Internet requests (REST API) and open a Socket on 3G/4G network, is it possible to do on Android? For iOS, it's not a big deal.
Steps: 1. I find Camera Wi-Fi and connect to it 2. Then I need to do some REST API queries 3. I need to open socenn and start streaming But due to Wi-Fi connection I can not get Internet access through 3G/4G
I've found the solution to the problem.
1) It's necessary to add Network then you can make a query
2) After that our Network appears in ConnectivityManager.getAllNetworks() you can find it by saving or by Network.hashCode()
I've checked this with help of 2 devices
1) device connected to WiFi with no internet access
2) Second device was connected to access point. Note mobile data should be on