Sorry for beeing a bit unclear on my answer. I just wanted to give you the code I am using to capture the back button usage by a user.
In my case I do show an confirm to close. But you could do what ever you want here:
//simply to do nothing :-)
That's why I wrote //simply do nothing.
The above code should capture the case where a user presses the backbutton and will call the onBackKeyDown() function. And I would assume if you do nothing there the backbutton will do exactely this - nothing and therefore not close the app.