Snippets tagged “main-thread”
2 snippets use this tag.
- How can I fix 'android.os.NetworkOnMainThreadException'?Java
The android.os.NetworkOnMainThreadException is a runtime exception that is thrown when an application attempts to perform a networking operation on the main thread.
- How to call a method after a delay in AndroidJava
To call a method after a delay in Android, you can use the Handler class and the postDelayed() method. The postDelayed() method takes a Runnable and a delay in milliseconds as arguments, and it runs the Runnable after the specified delay.