Medium
What happens if you call the code Thread.sleep(60*1000) from the GUI thread
and the user presses the "back" key on the terminal?
Author: Nicolas LaurentStatus: PublishedQuestion passed 359 times
Edit
0
Community Evaluations
Nordhal
07/09/2023
This is a trap because, it won't do nothing during the time freeze, and also raise an ANR but, if the user spends 60 seconds instead of clicking on the dialog, the UI will respond afterward
Similar QuestionsMore questions about Android
5
What is the purpose of a RecyclerView in Android?2
In the onStop() method. I am sure that this callback will always be called and it is likely to be returned only a few times.1
How to start a service in Android1
What is the name of the Android tool that is used to generate the R.java file?1
How to save the state of an Android activity when the device is rotated?