I am trying to execute a link so that I can control an ESP32 using Kotlin in Android Studio, but it is unable to execute it the same way a WebView can (I use the WebView to get a video feed, and it is able to transfer the video). The below is my code
Activity
val url = URL(ipcomm2)
val con: HttpURLConnection = url.openConnection() as HttpURLConnection
con.requestMethod = "POST"
WebView
setContentView(webview)
webview.loadUrl(IPfeed)
Can someone explain why this is the case? Thanks.