|
It'd be possible to disable the toast, but to make the button work with screen off, I think you'd have to change things in the OS (ROM) itself. The OS simply isn't listening to the button when it's in sleep/locked. I imagine it's a security issue too, as the way the button works, it would enable anyone to launch the app you've assigned to the button without unlocking the phone first.
The reason it flashes the screen, is the app that toggles sound/vibrate is an ordinary app. Even if it has no user interface as such, the launcher clears the screen when the app launches, and then redraws the "desktop" or whatever as it exits (which happens almost instantly). I'll investigate if there's another way of accomplishing this, but it was quite some time since I did any Android development - I threw this together during a lunch break just for fun. |
|