04-06-2009 11:21 AM
I am creating an app which uses files for various purposes. While the files are read,written or merged the app displays the Busy icon (Somehthing like a clock). Unlike others who want to display the hour glass while the app is busy ,what i want to do is to display a message ("Busy") while the device is actually busy reading or writing. Sometimes it takes upto 4 seconds..i cant predict how long it takes. so how can show a busy message whilst the device is actually busy ? is there any api to know when the device is actually busy? (when it is showing the clock icon?)
04-06-2009 12:15 PM
After start up, if you see the clock icon, it typically means that the device is doing a garbage collection. And no you don't want to initiate a garbage collection just to get the clock up for your app.
There is, as far as I know, no APi to display something similar from your application.
Remember that though you application is busy, other applications can still be running, so you don't actually want to lock the device.
The easiest thing to do is to push a PopupScreen, then pop it when you are finished. The popup screen will just say something like "Busy - Please wait" and will swallow all input, meaning that your application is locked, however the user will will able to ALT-ESC to task switch to another application if they want, and you should probably allow 'ESC' to put your application into the background too.
There is also an argument that says you should try to keep you application running, and only disable the parts of it that are waiting for the processing to finish, but for 3 or 4 seconds, that is probably not worth the extra coding.
04-06-2009 12:39 PM
I did something to my code without the hope of getting it right but now it s working voila.
I just inserted this code. And now what happens is as the app is busy by itself, this message is displayed as long as the app is busy,.lol
04-06-2009 12:47 PM