Menu becomes inactive when running background applet | developer.brewmp.com Menu becomes inactive when running background applet | developer.brewmp.com

Developer

Menu becomes inactive when running background applet

Forums:

Hello

I'm having a problem with running a background applet.
I start a background applet by pressing a button on a menu on the foreground applet, and the resulting function uses ISHELL_StartBackgroundApplet to start the background applet.

At this point, my menu becomes inactive, in fact the entire emulator becomes inactive, and there is nothing I can do until the background applet finishes it's job (it's just a simple file processing applet that runs for about 30 seconds).

Do you have any suggestions on what I could possibly be doing wrong, and why my foreground applet becomes inactive when I start the background applet?

Thanks

Dave

Is your background applet running in a cooperative manner (i.e. periodically returning control to the operating system, and doing its processing in idle periods using ISHELL_Resume)?
BREW is not a preemptive operating system. If your background applet does 30 seconds of processing in one go, without returning control to the OS, then it will be locking out everything else. The fact that the emulator locks up too strongly suggests that this is the problem.
If you don't understand what this means, then read
http://en.wikipedia.org/wiki/Computer_multitasking
and
https://brewx.qualcomm.com/bws/content/gi/common/appseng/en/knowledgebas...

Is your background applet running in a cooperative manner (i.e. periodically returning control to the operating system, and doing its processing in idle periods using ISHELL_Resume)?
BREW is not a preemptive operating system. If your background applet does 30 seconds of processing in one go, without returning control to the OS, then it will be locking out everything else. The fact that the emulator locks up too strongly suggests that this is the problem.
If you don't understand what this means, then read
http://en.wikipedia.org/wiki/Computer_multitasking
and
https://brewx.qualcomm.com/bws/content/gi/common/appseng/en/knowledgebas...

Hi,
The background app is clearly starting and coming to the foreground, to move it to the background you have to stop and return the proper value for dwparam for stop ( or some similar logic). Then you can schedule whatever processing you want it ot do in the background.
Here's qualcomm document link:
https://brewx.qualcomm.com/bws/content/gi/common/appseng/en/knowledgebas...
Thanks,
Ashwini

Hi,
The background app is clearly starting and coming to the foreground, to move it to the background you have to stop and return the proper value for dwparam for stop ( or some similar logic). Then you can schedule whatever processing you want it ot do in the background.
Here's qualcomm document link:
https://brewx.qualcomm.com/bws/content/gi/common/appseng/en/knowledgebas...
Thanks,
Ashwini