My (Kotlin) code gets data over an API and prints it into the Logcat.
When I’m using Android Studio’s emulator, the code works fine and it displays the data in the Logcat.
But when I pair my own phone over Wi-Fi, I get a SocketTimeoutException straight away. (Sometimes, I can get the data once or twice then I’ll get the exception)
Is there a specific thing I need to write into my code so I can use it on my own device?
How can I fix this problem?