0

To debug an app i need to deliberately, do some sort of task that would hang the UI thread. More specifically, so that the standard android message pops up saying "App is not responding" where you can either wait or force close.

Is there a way to do this? I would like the app to hang for say 2 minutes or so.

Daniel Jørgensen
  • 1,183
  • 2
  • 19
  • 42
  • Did you try `Thread.sleep(120000)`? Otherwise just make an infinite while loop. – Nicolas May 28 '20 at 22:25
  • Already tried a `while(true)` in MainActivity but this doesn't hang the UI thread. Or it does seem to hang it somewhat, but the message i specifically want to see (App not responding) doesn't show – Daniel Jørgensen May 28 '20 at 22:27

0 Answers0