Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

However, this raises the question: how does the MIDlet get to run any code when it is in the paused state?

code midlet paused raises run State
0
Posted

However, this raises the question: how does the MIDlet get to run any code when it is in the paused state?

0

resumeRequest() method. However, an application in the paused state is not forbidden to run any code; it just doesn’t get user interface events. If the application has spawned another thread, for example, that thread may continue to run even when the application is paused. More commonly, an application may set an asynchronous timer to wake itself up after a certain length of time. A request to resume is exactly that: a request. The runtime need not honour that request. Contrast this with the ability of the MIDlet to pause or terminate itself – no permission is required to do these things. As a result, a MIDlet should not reallocate its resources before or after calling resumeRequest(). Instead, it should wait for the runtime to call startApp().

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123