Is there a way to find out the message queue size and what item is in each message? Is it Looper.getMainLoop
or something?
Hope it's not too late for an answer. You can access the current thread's message queue calling Looper.myQueue() on it. However, the MessageQueue class has no methods to find out its size or what item is in each message. For that purpose, you could try the Handler class. A handler manages a looper, which has a queue, and that handler has methods like hasMessages, obtainMessage, removeMessages, and so on. I think that is your best shot.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With