Can you post the full error message from the logs?
Sorry. It seems the nsip I posted above was bit different from my actual code. The declaration of "myPhone as Phone" in my actual code was made in the Globals sub. When I moved it to the Activity_WindowFocusHasChanged sub, there is no longer a jaba.lang.NullPointerException error occuring, which I find pretty weird by the way.
Now, although the error disappeared, the sendBoradcastIntent command isn't doing what it is supposed to do here, and I can still open the recent apps dialog by long pressing the home key.
Any suggestions?