If you are trying to remove buttons from MediaPlayer and not part of your application, this is not possible. You cannot communicate with the code of other applications. Some of them may allow you to convey this as an additional intention when they are launched, but most probably will not.
If this is part of your application, just comment out the code associated with the buttons.
EDIT: From a MediaController document:
- The rewind and fast buttons are displayed unless otherwise requested using the MediaController (Context, boolean) constructor with a boolean value of false
So all you have to do is pass false in the constructor.
source share