Our Android app needs to communicate with a wifi access point without internet. In order to make the app still communicate with internet, we bind the process to cellular, and we bind sockets to that the wifi-network.
Network used to bind the process using connectivityManager.bindProcessToNetwork(network): val request = NetworkRequest.Builder() request.addTransportType(NetworkCapabilities.TRANSPORT_CELLULAR) request.addCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET) Network used to create socket, to communicate over the wifi: val request = NetworkRequest.Builder() request.addTransportType(NetworkCapabilities.TRANSPORT_WIFI) Our Kotlin code is now able to do http through cellular, and talk with other devices on wifi through the sockets. Problem is, GoMobile is not able to make http requests, they time out with a Get "https://google.com": context deadline exceeded (Client.Timeout exceeded while awaiting headers) I´m using a fresly created http client c := http.Client{ Timeout: 5 * time.Second } -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/f7951799-4a4a-43b5-bcf3-913bbc30e71b%40googlegroups.com.
