The application the I just wrote works perfectly. The only trouble is that there are times where no user input is required for a minute or so and the phone goes into sleep mode (this renders my application useless for reasons we don't need to go into here).
Normally, I want my phone to go into sleep mode to conserve power but not when my app is running. Is there a way, from within my application, to temporarily disable the sleep mode (or trick it into not going to sleep)?