Audio player controls on a locked screen

Dear (pro)Jucers!

Does anyone know how to implement audio player controls on a locked screen on Android?

I experimented with notifications but so far with only medium success. I managed to generate a notification with some buttons that is fully shown on a locked window but the problem is that I can’t interact with those buttons when the screen is locked.

Any ideas?